
(function(window) {
var aa, ca = {};
        if (void 0 === document.createElement("canvas").getContext)
        throw window.console && window.console.log("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode."), Error("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode.");
        if (!Object.prototype.__defineGetter__ && !Object.defineProperty)
        throw Error("GoJS requires a newer version of JavaScript");
        Object.prototype.__defineGetter__ && !Object.defineProperty && (Object.defineProperty = function(a, b, c) {
        c.get && a.__defineGetter__(b, c.get);
                c.set && a.__defineSetter__(b, c.set)
                });
        Object.prototype.__lookupGetter__ && !Object.getOwnPropertyDescriptor && (Object.getOwnPropertyDescriptor = function(a, b) {
        return{get: a.__lookupGetter__(b), set: a.__lookupSetter__(b)}
        });
        Object.getPrototypeOf || (Object.getPrototypeOf = function(a) {
        return a.__proto__
                });
        Object.isFrozen || (Object.isFrozen = function(a) {
        return!0 === a.nH
                });
        Object.freeze || (Object.freeze = function(a) {
        a.nH = !0
                });
        Array.isArray || (Array.isArray = function(a) {
        return"[object Array]" === Object.prototype.toString.call(a)
                });
        Function.prototype.bind || (Function.prototype.bind = function(a) {
        function b() {
        return g.apply(a, f.concat(d.call(arguments)))
                }
        function c() {
        }
        var d = Array.prototype.slice, f = d.call(arguments, 1), g = this;
                c.prototype = this.prototype;
                b.prototype = new c;
                return b
                });
        (function() {
        for (var a = 0, b = ["ms", "moz", "webkit", "o"], c = 0; c < b.length && !window.requestAnimationFrame; ++c)
                window.requestAnimationFrame = window[b[c] + "RequestAnimationFrame"], window.cancelAnimationFrame = window[b[c] + "CancelAnimationFrame"] || window[b[c] + "CancelRequestAnimationFrame"];
                window.requestAnimationFrame || (window.requestAnimationFrame = function(b) {
                var c = (new Date).getTime(), g = Math.max(8, 16 - (c - a)), h = window.setTimeout(function() {
                b(c + g)
                }, g);
                        a = c + g;
                        return h
                });
                window.cancelAnimationFrame || (window.cancelAnimationFrame =
                        function(a) {
                        clearTimeout(a)
                        })
        })();
        var e = {Rz: !1, sK: !1, EF: !1, PE: !1, XH: !1, assert: !1, fK: null, iK: function() {
        }, kK: function() {
        }, jK: function() {
        }, hK: function() {
        }, pK: function() {
        }, lK: function() {
        }, nK: function() {
        }, mK: function() {
        }, gK: !1, MK: !1, JK: !1, KK: !1, zI: !1, oK: function() {
        }}, e = null;
        ca.Debug = null;
        var t = {ji: Object.freeze([]), gA: {}, CE: 0, Cw: {}, fA: 0, Zs: "...", jt: {}, Iw: 0, mB: [], hx: null, kn: document.createElement("canvas").getContext("2d"), Sp: "", dK: document.createElement("img"), $z: [], hB: "ontouchstart"in window, PK: "ongesturestart"in window, lE: !1, Ts: null, Us: null, Ss: null, gw: "", Tm: window.navigator && 0 < window.navigator.userAgent.indexOf("534.30") && 0 < window.navigator.userAgent.indexOf("Android"), Nw: window.navigator && 0 < window.navigator.userAgent.indexOf("MSIE 10.0"), tA: window.navigator && 0 < window.navigator.userAgent.indexOf("Trident/7"),
                Um: 0 <= navigator.platform.toUpperCase().indexOf("MAC"), QG: !1, TG: !1, SG: !1, RG: !1, mE: null, Yp: !1, OG: !1, PG: !1, iE: function(a, b, c) {
        var d;
                return function() {
                var f = this, g = arguments;
                        clearTimeout(d);
                        d = setTimeout(function() {
                        d = null;
                                c || a.apply(f, g)
                                }, b);
                        c && !d && a.apply(f, g)
                        }
        }, m: function(a) {
        e && e.XH && alert(a);
                throw Error(a);
                }, L: function(a, b) {
        if (a.ob) {
        var c = "The object is frozen, so its properties cannot be set: " + a.toString();
                void 0 !== b && (c += "  to value: " + b);
                t.m(c)
                }
        }, l: function(a, b, c, d) {
        a instanceof b || (c = t.$h(c), void 0 !==
                d && (c += "." + d), t.bc(a, b, c))
                }, i: function(a, b, c, d) {
        typeof a !== b && (c = t.$h(c), void 0 !== d && (c += "." + d), t.bc(a, b, c))
                }, q: function(a, b, c) {
        "number" === typeof a && isFinite(a) || (b = t.$h(b), void 0 !== c && (b += "." + c), t.m(b + " must be a real number type, and not NaN or Infinity: " + a))
                }, Aa: function(a, b, c, d) {
        a instanceof da && a.Re === b || (c = t.$h(c), void 0 !== d && (c += "." + d), t.bc(a, "a constant of class " + t.ug(b), c))
                }, To: function(a, b) {
        "string" === typeof a ? ea(a) || t.m('Color "' + a + '" is not a valid color string for ' + b) : a instanceof
                fa || t.m("Value for " + b + " must be a color string or a Brush, not " + a)
                }, bc: function(a, b, c, d) {
        b = t.$h(b);
                c = t.$h(c);
                void 0 !== d && (c += "." + d);
                "string" === typeof a ? t.m(c + " value is not an instance of " + b + ': "' + a + '"') : t.m(c + " value is not an instance of " + b + ": " + a)
                }, la: function(a, b, c, d) {
        c = t.$h(c);
                void 0 !== d && (c += "." + d);
                t.m(c + " is not in the range " + b + ": " + a)
                }, $c: function(a) {
        t.m(t.ug(a) + " constructor cannot take any arguments.")
                }, Pb: function(a) {
        t.m("Collection was modified during iteration: " + a.toString() + "\n  Perhaps you should iterate over a copy of the collection,\n  or you could collect items to be removed from the collection after the iteration.")
                },
                trace: function(a) {
                window && window.console && window.console.log(a)
                        }, rb: function(a) {
        return"object" === typeof a && null !== a
                }, zc: null, Xm: function(a, b, c, d) {
        for (b = 0; b < a.length; b++) {
        var f = a[b];
                t.rb(f) && (f = t.wf(f, c, d));
                a[b] = f
                }
        return d || t.zc(a) ? a : window.ko.observableArray(a)
                }, wf: function(a, b, c) {
        if (a)
                for (var d in a)
                "__gohashid" !== d && (a[d] = t.eJ(a, d, b, c));
                return a
                }, eJ: function(a, b, c, d) {
        var f = a[b], g;
                g = t.zc(f) ? f : Array.isArray(f) ? t.Xm(f, b, c, d) : window.ko.observable(f);
                if (d) {
        if (d = g.EB) {
        h = c.__gohashid;
                d[h] && (d[h].dispose(),
                delete d[h]);
                var h = !1, k;
                for (k in d) {
        h = !0;
                break
                }
        }
        !h && g.mu && (g.mu.dispose(), delete g.mu)
                } else {
        g.mu || (g.mu = g.subscribe(function(a) {
        g.uo = a
                }, null, "beforeChange"));
                d = g.EB;
                d || (g.EB = d = {});
                var h = c.__gohashid;
                d[h] || (d[h] = g.subscribe(function(d) {
        c.ix(a, b, g.uo, d)
                }))
                }
        return g
                }, isArray: function(a) {
        return Array.isArray(a) || t.zc && t.zc(a) || a instanceof NodeList || a instanceof HTMLCollection
                }, VI: function(a) {
        return Array.isArray(a) || t.zc && t.zc(a)
                }, Rs: function(a, b, c) {
        t.isArray(a) || t.bc(a, "Array or NodeList or HTMLCollection",
                b, c)
                }, vb: function(a) {
        t.zc && t.zc(a) && (a = a());
                return a.length
                }, mb: function(a, b) {
        t.zc && t.zc(a) && (a = a());
                Array.isArray(a);
                return a[b]
                }, MD: function(a, b, c) {
        t.zc && t.zc(a) && (a = a());
                Array.isArray(a) ? a[b] = c : t.m("Cannot replace an object in an HTMLCollection or NodeList at " + b)
                }, Pz: function(a, b) {
        t.zc && t.zc(a) && (a = a());
                if (Array.isArray(a))
                return a.indexOf(b);
                for (var c = a.length, d = 0; d < c; d++)
                if (a[d] === b)
                return d;
                return - 1
                }, Si: function(a, b, c) {
        t.zc && t.zc(a) && (a = a());
                Array.isArray(a) ? b >= a.length ? a.push(c) : a.splice(b,
                0, c) : t.m("Cannot insert an object into an HTMLCollection or NodeList: " + c + " at " + b)
                }, Ti: function(a, b) {
        t.zc && t.zc(a) && (a = a());
                Array.isArray(a) ? b >= a.length ? a.pop() : a.splice(b, 1) : t.m("Cannot remove an object from an HTMLCollection or NodeList at " + b)
                }, Zx: [], K: function() {
        var a = t.Zx.pop();
                return void 0 === a ? new w : a
                }, lc: function(a, b) {
        var c = t.Zx.pop();
                if (void 0 === c)
                return new w(a, b);
                c.x = a;
                c.y = b;
                return c
                }, B: function(a) {
        t.Zx.push(a)
                }, AB: [], Al: function() {
        var a = t.AB.pop();
                return void 0 === a ? new ga : a
                }, bk: function(a) {
        t.AB.push(a)
                },
                $x: [], Df: function() {
        var a = t.$x.pop();
                return void 0 === a ? new x : a
                }, hk: function(a, b, c, d) {
        var f = t.$x.pop();
                if (void 0 === f)
                return new x(a, b, c, d);
                f.x = a;
                f.y = b;
                f.width = c;
                f.height = d;
                return f
                }, hc: function(a) {
        t.$x.push(a)
                }, BB: [], oh: function() {
        var a = t.BB.pop();
                return void 0 === a ? new ha : a
                }, We: function(a) {
        t.BB.push(a)
                }, ay: null, u: function() {
        var a = t.ay;
                return null !== a ? (t.ay = null, a) : new ia
                }, v: function(a) {
        a.reset();
                t.ay = a
                }, zB: [], Cb: function() {
        var a = t.zB.pop();
                return void 0 === a ? [] : a
                }, ya: function(a) {
        a.length = 0;
                t.zB.push(a)
                },
                CB: 1, Ac: function(a) {
                a.__gohashid = t.CB++
                        }, it: function(a) {
        var b = a.__gohashid;
                void 0 === b && (b = t.CB++, a.__gohashid = b);
                return b
                }, od: function(a) {
        return a.__gohashid
                }, g: function(a, b, c) {
        "name" !== b && "length" !== b && (a[b] = c)
                }, ga: function(a, b) {
        b.ly = a;
                ca[a] = b
                }, Ka: function(a, b) {
        function c() {
        }
        c.prototype = b.prototype;
                a.prototype = new c;
                a.prototype.constructor = a
                }, Xh: function(a) {
        a.rH = !0
                }, defineProperty: function(a, b, c, d, f) {
        t.i(a, "function", "Util.defineProperty:classfunc");
                t.i(b, "object", "Util.defineProperty:propobj");
                t.i(c, "function", "Util.defineProperty:getter");
                t.i(d, "function", "Util.defineProperty:setter");
                for (var g in b) {
        var h = b[g];
                b = {get: c, set: d};
                if (void 0 !== f)
                for (var k in f)
                b[k] = f[k];
                Object.defineProperty(a.prototype, g, b);
                f = Object.getOwnPropertyDescriptor(a.prototype, g);
                h && f && Object.defineProperty(a.prototype, h, f);
                if (e && h) {
        var l = h.charAt(0).toUpperCase() + h.slice(1);
                h === l && t.m('Defining capitalized property "' + l + '"!?');
                Object.defineProperty(a.prototype, l, {get: function() {
                t.Nw || t.tA || t.trace('Getting the property "' +
                        l + '" is probably not what you intended: it is capitalized but should be spelled "' + h + '"')
                        }, set: function() {
                t.m('Setting the property "' + l + '" is probably not what you intended: it is capitalized but should be spelled "' + h + '"')
                }})
                }
        break
                }
        }, A: function(a, b, c, d) {
        t.i(a, "function", "Util.defineReadOnlyProperty:classfunc");
                t.i(b, "object", "Util.defineReadOnlyProperty:propobj");
                t.i(c, "function", "Util.defineReadOnlyProperty:getter");
                for (var f in b) {
        var g = b[f];
                b = {get: c, set: function(a) {
                t.m('The property "' + g + '" is read-only and cannot be set to ' +
                        a)
                }};
                if (void 0 !== d)
                for (var h in d)
                b[h] = d[h];
                Object.defineProperty(a.prototype, f, b);
                d = Object.getOwnPropertyDescriptor(a.prototype, f);
                g && d && Object.defineProperty(a.prototype, g, d);
                if (e && g) {
        var k = g.charAt(0).toUpperCase() + g.slice(1);
                Object.defineProperty(a.prototype, k, {get: function() {
                t.Nw || t.tA || t.trace('Getting the property "' + k + '" is probably not what you intended: it is capitalized but should be spelled "' + g + '"')
                        }, set: function() {
                t.m('Setting the read-only property "' + k + '" is probably not what you intended: it is capitalized but should be spelled "' +
                        g + '", and cannot be set anyway')
                }})
                }
        break
                }
        }, Td: function(a, b) {
        for (var c in b)
                b[c] = !0;
                a.prototype.WC = b
                }, $h: function(a) {
        return void 0 === a ? "" : "string" === typeof a ? a : "function" === typeof a ? t.ug(a) : null === a ? "*" : ""
                }, ug: function(a) {
        if ("function" === typeof a) {
        if (a.ly)
                return a.ly;
                if (a.name)
                return a.name;
                var b = a.toString(), c = b.indexOf("(");
                if (b = b.substring(9, c).trim())
                return a.ly = b
                } else if ("object" === typeof a && a.constructor)
                return t.ug(a.constructor);
                return typeof a
                }, w: function(a, b, c) {
        t.i(a, "function", "Util.defineEnumValue:classfunc");
                t.i(b, "string", "Util.defineEnumValue:name");
                t.i(c, "number", "Util.defineEnumValue:num");
                c = new da(a, b, c);
                Object.freeze(c);
                a[b] = c;
                var d = a.$t;
                d || (d = new ja("string", da), a.$t = d);
                d.add(b, c);
                return c
                }, Om: function(a, b) {
        if (!b)
                return null;
                t.i(a, "function", "Util.findEnumValueForName:classfunc");
                t.i(b, "string", "Util.findEnumValueForName:name");
                var c = a.$t;
                return c ? c.za(b) : null
                }, eI: function(a, b, c, d) {
        var f = {}, g;
                for (g in a) {
        for (var h = !1, k = 1; k < arguments.length; k++)
                if (arguments[k] === g) {
        h = !0;
                break
                }
        h || (f[g] = a[g])
                }
        return f
                },
                hb: function(a, b) {
                if (!a || !b)
                        return null;
                        var c = void 0;
                        try {
                        "function" === typeof b ? c = b(a) : "function" === typeof a.getAttribute ? (c = a.getAttribute(b), null === c && (c = void 0)) : (c = a[b], t.zc && t.zc(c) && (c = c()))
                                } catch (d) {
                e && t.trace("property get error: " + d.toString())
                        }
                return c
                        }, Ra: function(a, b, c) {
        if (a && b)
                try {
                if ("function" === typeof b)
                        b(a, c);
                        else if ("function" === typeof a.setAttribute)
                        a.setAttribute(b, c);
                        else if (t.zc) {
                var d = a[b];
                        t.zc(d) ? d(c) : a[b] = c
                        } else
                        a[b] = c
                        } catch (f) {
        e && t.trace("property set error: " + f.toString())
                }
        },
                px: function(a, b) {
                t.i(a, "object", "Setting properties requires Objects as arguments");
                        t.i(b, "object", "Setting properties requires Objects as arguments");
                        var c = e;
                        c || (e = t);
                        var d = a instanceof y, f = a instanceof z, g;
                        for (g in b) {
                g || t.m("Setting properties requires non-empty property names");
                        var h = a, k = g;
                        if (d || f) {
                var l = g.indexOf(".");
                        if (0 < l) {
                var m = g.substring(0, l);
                        d ? h = a.me(m) : (h = a[m]) || (h = a.wb[m]);
                        h ? k = g.substr(l + 1) : t.m("Unable to find object named: " + m + " in " + a.toString() + " when trying to set property: " + g)
                        }
                }
                if ("_" !==
                        k[0] && !t.Gw(h, k))
                        if (f && t.Gw(a.wb, k))
                        h = a.wb;
                        else if (f && ma(a, k)) {
                a.Jz(k, b[k]);
                        continue
                        } else
                        t.m('Trying to set undefined property "' + k + '" on object: ' + h.toString());
                        h[k] = b[g];
                        "_" === k[0] && (l = h.Kl, l || (l = [], h.Kl = l), l.push(k))
                        }
                e = c;
                        return a
                        }, Gw: function(a, b) {
        for (var c = Object.getPrototypeOf(a); c && c !== Function; ) {
        if (c.hasOwnProperty(b))
                return!0;
                var d = c.WC;
                if (d && d[b])
                return!0;
                c = Object.getPrototypeOf(c)
                }
        return!1
                }, SD: function(a, b) {
        if (!t.rb(b) || b instanceof Element || b instanceof CanvasRenderingContext2D)
                return"";
                var c = "", d;
                for (d in b)
                if ("string" !== typeof d)
                "" === c && (c = b + "\n"), c += "  " + d + " is not a string property\n";
                else if ("_" !== d.charAt(0) && !(2 >= d.length)) {
        var f = t.hb(b, d);
                null === f || "function" === typeof f || t.Gw(b, d) || ("" === c && (c = b + "\n"), c += '  unknown property "' + d + '" has value: ' + f + " at " + a + "\n")
                }
        return c
                }, ew: function(a, b) {
        if (b && "number" !== typeof b && "string" !== typeof b && "boolean" !== typeof b && "function" !== typeof b)
                if (void 0 !== t.od(b)) {
        if (!t.Dv.contains(b))
                if (t.Dv.add(b), t.dv.add(t.SD(a, b)), b instanceof B || b instanceof
                        C || b instanceof ja)
                for (var c = b.k; c.next(); )
                t.ew(a + "[" + c.key + "]", c.value);
                else
                for (c in b) {
        var d = t.hb(b, c);
                if (void 0 !== d && null !== d && t.rb(d) && d !== b.WC) {
        if (b instanceof na) {
        if (d === b.oo)
                continue
                } else if (b instanceof y) {
        if ("data" === c || d === b.Ml)
                continue;
                if ("itemArray" === c || d === b.yi)
                continue;
                if (b instanceof E && d === b.Gj)
                continue
                } else if (!(b instanceof z))
                if (b instanceof oa) {
        if ("archetypeGroupData" === c || d === b.gy)
                continue
                } else if (b instanceof pa) {
        if ("archetypeLinkData" === c || d === b.iy)
                continue;
                if ("archetypeLabelNodeData" ===
                        c || d === b.hy)
                continue
                } else if (b instanceof qa) {
        if ("archetypeNodeData" === c || d === b.wk)
                continue
                } else if (b instanceof F) {
        if ("nodeDataArray" === c || d === b.Me)
                continue;
                if ("linkDataArray" === c || d === b.Vg || d === b.bm)
                continue;
                if (d === b.Bc)
                continue;
                if (d === b.xh)
                continue
                } else if (b instanceof ra || b instanceof ta || b instanceof ua)
                continue;
                t.ew(a + "." + c, d)
                }
        }
        } else if (Array.isArray(b))
                for (c = 0; c < b.length; c++)
                t.ew(a + "[" + c + "]", b[c]);
                else
                t.dv.add(t.SD(a, b))
                }, $H: function(a) {
        void 0 === t.Dv ? t.Dv = new C : t.Dv.clear();
                t.dv = new wa;
                t.ew("",
                        a);
                a = t.dv.toString();
                t.dv = null;
                return a
                }, BJ: function(a) {
        for (var b = [], c = 0; 256 > c; c++)
                b[c] = c;
                for (var d = 0, f, c = 0; 256 > c; c++)
                d = (d + b[c] + 119) % 256, f = b[c], b[c] = b[d], b[d] = f;
                for (var d = c = 0, g = "", h = 0; h < a.length; h++)
                c = (c + 1) % 256, d = (d + b[c]) % 256, f = b[c], b[c] = b[d], b[d] = f, g += String.fromCharCode(a.charCodeAt(h) ^ b[(b[c] + b[d]) % 256]);
                return g
                }, MI: function(a) {
        for (var b = [], c = 0; 256 > c; c++)
                b["0123456789abcdef".charAt(c >> 4) + "0123456789abcdef".charAt(c & 15)] = String.fromCharCode(c);
                a.length % 2 && (a = "0" + a);
                for (var d = [], f = 0, c = 0; c < a.length; c +=
                        2)
                d[f++] = b[a.substr(c, 2)];
                a = d.join("");
                return"" === a ? "0" : a
                }, Ha: function(a) {
        return t.BJ(t.MI(a))
                }, El: null, Zv: "7da71ca0ad381e90", aI: "@COLOR1", bI: "@COLOR2"};
        t.El = function() {
        var a = document.createElement("canvas"), b = a.getContext("2d");
                b[t.Ha("7ca11abfd022028846")] = t.Ha("398c3597c01238");
                for (var c = ["5da73c80a3330d854f9e5e671d6633", "32ab5ff3b26f42dc0ed90f22402913b54ae6247590da4bb21c324ba3a84e385776", "54a702f3e53909c447824c6706603faf4cfb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387", "74bf19bce72555874c86"], d = 1; 5 > d; d++)
                b[t.Ha("7ca11abfd7330390")](t.Ha(c[d - 1]), 10, 15 * d + 0);
                b[t.Ha("7ca11abfd022028846")] = t.Ha("39f046ebb36e4b");
                for (d = 1; 5 > d; d++)
                b[t.Ha("7ca11abfd7330390")](t.Ha(c[d -
                1]), 10, 15 * d + 0);
                if (4 !== c.length || "5" !== c[0][0] || "7" !== c[3][0])
                t.w = function(a, b) {
                var c = new da(a, b, 2);
                        Object.freeze(c);
                        a[b] = c;
                        var d = a.$t;
                        d || (d = new ja("string", da), a.$t = d);
                        d.add(b, c);
                        return c
                        };
                return a
                }();
        function da(a, b, c) {
        t.Ac(this);
                this.KB = a;
                this.Yb = b;
                this.wH = c
        }
da.prototype.toString = function() {
return t.ug(this.KB) + "." + this.Yb
        };
        t.A(da, {Re: "classType"}, function() {
        return this.KB
                });
        t.A(da, {name: "name"}, function() {
        return this.Yb
                });
        t.A(da, {value: "value"}, function() {
        return this.wH
                });
        function wa() {
        this.JB = []
        }
wa.prototype.toString = function() {
return this.JB.join("")
        };
        wa.prototype.add = function(a) {
        a && this.JB.push(a)
                };
        function ya() {
        }
t.A(ya, {k: "iterator"}, function() {
return this
        });
        ya.prototype.reset = ya.prototype.reset = function() {
        };
        ya.prototype.next = ya.prototype.hasNext = ya.prototype.next = function() {
        return!1
                };
        ya.prototype.first = ya.prototype.$a = function() {
        return null
                };
        ya.prototype.any = function() {
        return!1
                };
        ya.prototype.all = function() {
        return!0
                };
        ya.prototype.each = function() {
        };
        t.A(ya, {count: "count"}, function() {
        return 0
                });
        ya.prototype.$f = function() {
        };
        ya.prototype.toString = function() {
        return"EmptyIterator"
                };
        t.Yf = new ya;
        function Aa(a) {
        this.key = - 1;
                this.value = a
        }
t.Td(Aa, {key: !0, value: !0});
        t.A(Aa, {k: "iterator"}, function() {
        return this
                });
        Aa.prototype.reset = Aa.prototype.reset = function() {
        this.key = - 1
                };
        Aa.prototype.next = Aa.prototype.hasNext = Aa.prototype.next = function() {
        return - 1 === this.key ? (this.key = 0, !0) : !1
                };
        Aa.prototype.first = Aa.prototype.$a = function() {
        this.key = 0;
                return this.value
                };
        Aa.prototype.any = function(a) {
        this.key = - 1;
                return a(this.value)
                };
        Aa.prototype.all = function(a) {
        this.key = - 1;
                return a(this.value)
                };
        Aa.prototype.each = function(a) {
        this.key = - 1;
                a(this.value)
                };
        t.A(Aa, {count: "count"}, function() {
        return 1
                });
        Aa.prototype.$f = function() {
        this.value = null
                };
        Aa.prototype.toString = function() {
        return"SingletonIterator(" + this.value + ")"
                };
        function Ba(a) {
        this.Bd = a;
                this.Jj = null;
                this.reset()
        }
t.Td(Ba, {key: !0, value: !0});
        t.A(Ba, {k: "iterator"}, function() {
        return this
                });
        t.g(Ba, "predicate", Ba.prototype.sl);
        t.defineProperty(Ba, {sl: "predicate"}, function() {
        return this.Jj
                }, function(a) {
        this.Jj = a
                });
        Ba.prototype.reset = Ba.prototype.reset = function() {
        var a = this.Bd;
                a.Ad = null;
                this.Ya = a.V;
                this.Sc = - 1
                };
        Ba.prototype.next = Ba.prototype.hasNext = Ba.prototype.next = function() {
        var a = this.Bd;
                a.V !== this.Ya && t.Pb(a);
                var a = a.n, b = a.length, c = ++this.Sc, d = this.Jj;
                if (null !== d)
                for (; c < b; ) {
        var f = a[c];
                if (d(f))
                return this.key = this.Sc = c, this.value = f, !0;
                c++
                }
        else {
        if (c < b)
                return this.key = c, this.value = a[c], !0;
                this.$f()
                }
        return!1
                };
        Ba.prototype.first = Ba.prototype.$a = function() {
        var a = this.Bd;
                this.Ya = a.V;
                this.Sc = 0;
                var a = a.n, b = a.length, c = this.Jj;
                if (null !== c) {
        for (var d = 0; d < b; ) {
        var f = a[d];
                if (c(f))
                return this.key = this.Sc = d, this.value = f;
                d++
                }
        return null
                }
        return 0 < b ? (f = a[0], this.key = 0, this.value = f) : null
                };
        Ba.prototype.any = function(a) {
        var b = this.Bd;
                b.Ad = null;
                var c = b.V;
                this.Sc = - 1;
                for (var d = b.n, f = d.length, g = this.Jj, h = 0; h < f; h++) {
        var k = d[h];
                if (null === g || g(k)) {
        if (a(k))
                return!0;
                b.V !== c && t.Pb(b)
                }
        }
        return!1
                };
        Ba.prototype.all = function(a) {
        var b = this.Bd;
                b.Ad = null;
                var c = b.V;
                this.Sc = - 1;
                for (var d = b.n, f = d.length, g = this.Jj, h = 0; h < f; h++) {
        var k = d[h];
                if (null === g || g(k)) {
        if (!a(k))
                return!1;
                b.V !== c && t.Pb(b)
                }
        }
        return!0
                };
        Ba.prototype.each = function(a) {
        var b = this.Bd;
                b.Ad = null;
                var c = b.V;
                this.Sc = - 1;
                for (var d = b.n, f = d.length, g = this.Jj, h = 0; h < f; h++) {
        var k = d[h];
                if (null === g || g(k))
                a(k), b.V !== c && t.Pb(b)
                }
        };
        t.A(Ba, {count: "count"}, function() {
        var a = this.Jj;
                if (null !== a) {
        for (var b = 0, c = this.Bd.n, d = c.length, f = 0; f < d; f++)
                a(c[f]) && b++;
                return b
                }
        return this.Bd.n.length
                });
        Ba.prototype.$f = function() {
        this.key = - 1;
                this.value = null;
                this.Ya = - 1;
                this.Jj = null;
                this.Bd.Ad = this
                };
        Ba.prototype.toString = function() {
        return"ListIterator@" + this.Sc + "/" + this.Bd.count
                };
        function Ca(a) {
        this.Bd = a;
                this.reset()
        }
t.Td(Ca, {key: !0, value: !0});
        t.A(Ca, {k: "iterator"}, function() {
        return this
                });
        Ca.prototype.reset = Ca.prototype.reset = function() {
        var a = this.Bd;
                a.ho = null;
                this.Ya = a.V;
                this.Sc = a.n.length
                };
        Ca.prototype.next = Ca.prototype.hasNext = Ca.prototype.next = function() {
        var a = this.Bd;
                a.V !== this.Ya && t.Pb(a);
                var b = --this.Sc;
                if (0 <= b)
                return this.key = b, this.value = a.n[b], !0;
                this.$f();
                return!1
                };
        Ca.prototype.first = Ca.prototype.$a = function() {
        var a = this.Bd;
                this.Ya = a.V;
                var b = a.n;
                this.Sc = a = b.length - 1;
                return 0 <= a ? (b = b[a], this.key = a, this.value = b) : null
                };
        Ca.prototype.any = function(a) {
        var b = this.Bd;
                b.ho = null;
                var c = b.V, d = b.n, f = d.length;
                this.Sc = f;
                for (f -= 1; 0 <= f; f++) {
        if (a(d[f]))
                return!0;
                b.V !== c && t.Pb(b)
                }
        return!1
                };
        Ca.prototype.all = function(a) {
        var b = this.Bd;
                b.ho = null;
                var c = b.V, d = b.n, f = d.length;
                this.Sc = f;
                for (f -= 1; 0 <= f; f++) {
        if (!a(d[f]))
                return!1;
                b.V !== c && t.Pb(b)
                }
        return!0
                };
        Ca.prototype.each = function(a) {
        var b = this.Bd;
                b.ho = null;
                var c = b.V, d = b.n, f = d.length;
                this.Sc = f;
                for (f -= 1; 0 <= f; f++)
                a(d[f]), b.V !== c && t.Pb(b)
                };
        t.A(Ca, {count: "count"}, function() {
        return this.Bd.n.length
                });
        Ca.prototype.$f = function() {
        this.key = - 1;
                this.value = null;
                this.Ya = - 1;
                this.Bd.ho = this
                };
        Ca.prototype.toString = function() {
        return"ListIteratorBackwards(" + this.Sc + "/" + this.Bd.count + ")"
                };
        function B(a) {
        t.Ac(this);
                this.ob = !1;
                this.n = [];
                this.V = 0;
                this.ho = this.Ad = null;
                void 0 === a || null === a ? this.da = null : "string" === typeof a ? "object" === a || "string" === a || "number" === a || "boolean" === a || "function" === a ? this.da = a : t.la(a, "the string 'object', 'number', 'string', 'boolean', or 'function'", "List constructor: type") : "function" === typeof a ? this.da = a === Object ? "object" : a === String ? "string" : a === Number ? "number" : a === Boolean ? "boolean" : a === Function ? "function" : a : t.la(a, "null, a primitive type name, or a class type",
                "List constructor: type")
        }
t.ga("List", B);
        B.prototype.Ng = function(a) {
        null !== this.da && ("string" === typeof this.da ? typeof a === this.da && null !== a || t.bc(a, this.da) : a instanceof this.da || t.bc(a, this.da))
                };
        B.prototype.Od = function() {
        var a = this.V;
                a++;
                999999999 < a && (a = 0);
                this.V = a
                };
        B.prototype.freeze = B.prototype.freeze = function() {
        this.ob = !0;
                return this
                };
        B.prototype.thaw = B.prototype.La = function() {
        this.ob = !1;
                return this
                };
        B.prototype.toString = function() {
        return"List(" + t.$h(this.da) + ")#" + t.od(this)
                };
        B.prototype.add = B.prototype.add = function(a) {
        null !== a && (e && this.Ng(a), t.L(this, a), this.n.push(a), this.Od())
                };
        B.prototype.addAll = B.prototype.Oe = function(a) {
        if (null === a)
                return this;
                t.L(this);
                var b = this.n;
                if (t.isArray(a))
                for (var c = t.vb(a), d = 0; d < c; d++) {
        var f = t.mb(a, d);
                e && this.Ng(f);
                b.push(f)
                }
        else
                for (a = a.k; a.next(); )
                f = a.value, e && this.Ng(f), b.push(f);
                this.Od();
                return this
                };
        B.prototype.clear = B.prototype.clear = function() {
        t.L(this);
                this.n.length = 0;
                this.Od()
                };
        B.prototype.contains = B.prototype.has = B.prototype.contains = function(a) {
        if (null === a)
                return!1;
                e && this.Ng(a);
                return - 1 !== this.n.indexOf(a)
                };
        B.prototype.indexOf = B.prototype.indexOf = function(a) {
        if (null === a)
                return - 1;
                e && this.Ng(a);
                return this.n.indexOf(a)
                };
        B.prototype.elt = B.prototype.get = B.prototype.wa = function(a) {
        e && t.q(a, B, "elt:i");
                var b = this.n;
                (0 > a || a >= b.length) && t.la(a, "0 <= i < length", B, "elt:i");
                return b[a]
                };
        B.prototype.setElt = B.prototype.set = B.prototype.Kg = function(a, b) {
        e && (this.Ng(b), t.q(a, B, "setElt:i"));
                var c = this.n;
                (0 > a || a >= c.length) && t.la(a, "0 <= i < length", B, "setElt:i");
                t.L(this, a);
                c[a] = b
                };
        B.prototype.first = B.prototype.$a = function() {
        var a = this.n;
                return 0 === a.length ? null : a[0]
                };
        B.prototype.any = function(a) {
        for (var b = this.n, c = this.V, d = b.length, f = 0; f < d; f++) {
        if (a(b[f]))
                return!0;
                this.V !== c && t.Pb(this)
                }
        return!1
                };
        B.prototype.all = function(a) {
        for (var b = this.n, c = this.V, d = b.length, f = 0; f < d; f++) {
        if (!a(b[f]))
                return!1;
                this.V !== c && t.Pb(this)
                }
        return!0
                };
        B.prototype.each = function(a) {
        for (var b = this.n, c = this.V, d = b.length, f = 0; f < d; f++)
                a(b[f]), this.V !== c && t.Pb(this)
                };
        B.prototype.insertAt = B.prototype.Gd = function(a, b) {
        e && (this.Ng(b), t.q(a, B, "insertAt:i"));
                0 > a && t.la(a, ">= 0", B, "insertAt:i");
                t.L(this, a);
                var c = this.n;
                a >= c.length ? c.push(b) : c.splice(a, 0, b);
                this.Od();
                return!0
                };
        B.prototype.remove = B.prototype["delete"] = B.prototype.remove = function(a) {
if (null === a)
        return!1;
        e && this.Ng(a);
        t.L(this, a);
        var b = this.n;
        a = b.indexOf(a);
        if ( - 1 === a)
        return!1;
        a === b.length - 1 ? b.pop() : b.splice(a, 1);
        this.Od();
        return!0
        };
        B.prototype.removeAt = B.prototype.qd = function(a) {
        e && t.q(a, B, "removeAt:i");
                var b = this.n;
                (0 > a || a >= b.length) && t.la(a, "0 <= i < length", B, "removeAt:i");
                t.L(this, a);
                a === b.length - 1 ? b.pop() : b.splice(a, 1);
                this.Od()
                };
        B.prototype.removeRange = B.prototype.removeRange = function(a, b) {
        e && (t.q(a, B, "removeRange:from"), t.q(b, B, "removeRange:to"));
                var c = this.n;
                (0 > a || a >= c.length) && t.la(a, "0 <= from < length", B, "elt:from");
                (0 > b || b >= c.length) && t.la(b, "0 <= to < length", B, "elt:to");
                t.L(this, a);
                var d = c.slice((b || a) + 1 || c.length);
                c.length = 0 > a ? c.length + a : a;
                c.push.apply(c, d);
                this.Od()
                };
        B.prototype.copy = function() {
        for (var a = new B(this.da), b = this.n, c = this.count, d = 0; d < c; d++)
                a.add(b[d]);
                return a
                };
        B.prototype.toArray = B.prototype.Ie = function() {
        for (var a = this.n, b = this.count, c = Array(b), d = 0; d < b; d++)
                c[d] = a[d];
                return c
                };
        B.prototype.toSet = function() {
        for (var a = new C(this.da), b = this.n, c = this.count, d = 0; d < c; d++)
                a.add(b[d]);
                return a
                };
        B.prototype.sort = B.prototype.sort = function(a) {
        e && t.i(a, "function", B, "sort:sortfunc");
                t.L(this);
                this.n.sort(a);
                this.Od();
                return this
                };
        B.prototype.sortRange = B.prototype.Tp = function(a, b, c) {
        var d = this.n, f = d.length;
                void 0 === b && (b = 0);
                void 0 === c && (c = f);
                e && (t.i(a, "function", B, "sortRange:sortfunc"), t.q(b, B, "sortRange:from"), t.q(c, B, "sortRange:to"));
                t.L(this);
                var g = c - b;
                if (1 >= g)
                return this;
                (0 > b || b >= f - 1) && t.la(b, "0 <= from < length", B, "sortRange:from");
                if (2 === g)
                return c = d[b], f = d[b + 1], 0 < a(c, f) && (d[b] = f, d[b + 1] = c, this.Od()), this;
                if (0 === b)
                if (c >= f)
                d.sort(a);
                else
                for (g = d.slice(0, c), g.sort(a), a = 0; a < c; a++)
                d[a] = g[a];
                else if (c >= f)
                for (g = d.slice(b), g.sort(a),
                        a = b; a < f; a++)
                d[a] = g[a - b];
                else
                for (g = d.slice(b, c), g.sort(a), a = b; a < c; a++)
                d[a] = g[a - b];
                this.Od();
                return this
                };
        B.prototype.reverse = B.prototype.reverse = function() {
        t.L(this);
                this.n.reverse();
                this.Od();
                return this
                };
        t.A(B, {count: "count"}, function() {
        return this.n.length
                });
        t.A(B, {size: "size"}, function() {
        return this.n.length
                });
        t.A(B, {length: "length"}, function() {
        return this.n.length
                });
        t.A(B, {k: "iterator"}, function() {
        if (0 >= this.n.length)
                return t.Yf;
                var a = this.Ad;
                return null !== a ? (a.reset(), a) : new Ba(this)
                });
        t.A(B, {Wm: "iteratorBackwards"}, function() {
        if (0 >= this.n.length)
                return t.Yf;
                var a = this.ho;
                return null !== a ? (a.reset(), a) : new Ca(this)
                });
        function Da(a) {
        this.p = a;
                this.reset()
        }
t.Td(Da, {key: !0, value: !0});
        t.A(Da, {k: "iterator"}, function() {
        return this
                });
        Da.prototype.reset = Da.prototype.reset = function() {
        var a = this.p;
                a.Ad = null;
                this.Ya = a.V;
                this.yb = null
                };
        Da.prototype.next = Da.prototype.hasNext = Da.prototype.next = function() {
        var a = this.p;
                a.V !== this.Ya && t.Pb(a);
                var b = this.yb, b = null === b ? a.cb : b.Sb;
                if (null !== b)
                return this.yb = b, this.value = b.value, this.key = b.key, !0;
                this.$f();
                return!1
                };
        Da.prototype.first = Da.prototype.$a = function() {
        var a = this.p;
                this.Ya = a.V;
                a = a.cb;
                if (null !== a) {
        this.yb = a;
                var b = a.value;
                this.key = a.key;
                return this.value = b
                }
        return null
                };
        Da.prototype.any = function(a) {
        var b = this.p;
                b.Ad = null;
                var c = b.V;
                this.yb = null;
                for (var d = b.cb; null !== d; ) {
        if (a(d.value))
                return!0;
                b.V !== c && t.Pb(b);
                d = d.Sb
                }
        return!1
                };
        Da.prototype.all = function(a) {
        var b = this.p;
                b.Ad = null;
                var c = b.V;
                this.yb = null;
                for (var d = b.cb; null !== d; ) {
        if (!a(d.value))
                return!1;
                b.V !== c && t.Pb(b);
                d = d.Sb
                }
        return!0
                };
        Da.prototype.each = function(a) {
        var b = this.p;
                b.Ad = null;
                var c = b.V;
                this.yb = null;
                for (var d = b.cb; null !== d; )
                a(d.value), b.V !== c && t.Pb(b), d = d.Sb
                };
        t.A(Da, {count: "count"}, function() {
        return this.p.dd
                });
        Da.prototype.$f = function() {
        this.value = this.key = null;
                this.Ya = - 1;
                this.p.Ad = this
                };
        Da.prototype.toString = function() {
        return null !== this.yb ? "SetIterator@" + this.yb.value : "SetIterator"
                };
        function C(a) {
        t.Ac(this);
                this.ob = !1;
                void 0 === a || null === a ? this.da = null : "string" === typeof a ? "object" === a || "string" === a || "number" === a ? this.da = a : t.la(a, "the string 'object', 'number' or 'string'", "Set constructor: type") : "function" === typeof a ? this.da = a === Object ? "object" : a === String ? "string" : a === Number ? "number" : a : t.la(a, "null, a primitive type name, or a class type", "Set constructor: type");
                this.ed = {};
                this.dd = 0;
                this.Ad = null;
                this.V = 0;
                this.Ih = this.cb = null
        }
t.ga("Set", C);
        C.prototype.Ng = function(a) {
        null !== this.da && ("string" === typeof this.da ? typeof a === this.da && null !== a || t.bc(a, this.da) : a instanceof this.da || t.bc(a, this.da))
                };
        C.prototype.Od = function() {
        var a = this.V;
                a++;
                999999999 < a && (a = 0);
                this.V = a
                };
        C.prototype.freeze = C.prototype.freeze = function() {
        this.ob = !0;
                return this
                };
        C.prototype.thaw = C.prototype.La = function() {
        this.ob = !1;
                return this
                };
        C.prototype.toString = function() {
        return"Set(" + t.$h(this.da) + ")#" + t.od(this)
                };
        C.prototype.add = C.prototype.add = function(a) {
        if (null === a)
                return!1;
                e && this.Ng(a);
                t.L(this, a);
                var b = a;
                t.rb(a) && (b = t.it(a));
                return void 0 === this.ed[b] ? (this.dd++, a = new Ea(a, a), this.ed[b] = a, b = this.Ih, null === b ? this.cb = a : (a.vo = b, b.Sb = a), this.Ih = a, this.Od(), !0) : !1
                };
        C.prototype.addAll = C.prototype.Oe = function(a) {
        if (null === a)
                return this;
                t.L(this);
                if (t.isArray(a))
                for (var b = t.vb(a), c = 0; c < b; c++)
                this.add(t.mb(a, c));
                else
                for (a = a.k; a.next(); )
                this.add(a.value);
                return this
                };
        C.prototype.contains = C.prototype.has = C.prototype.contains = function(a) {
        if (null === a)
                return!1;
                e && this.Ng(a);
                var b = a;
                return t.rb(a) && (b = t.od(a), void 0 === b) ? !1 : void 0 !== this.ed[b]
                };
        C.prototype.containsAll = function(a) {
        if (null === a)
                return!0;
                for (a = a.k; a.next(); )
                if (!this.contains(a.value))
                return!1;
                return!0
                };
        C.prototype.containsAny = function(a) {
        if (null === a)
                return!0;
                for (a = a.k; a.next(); )
                if (this.contains(a.value))
                return!0;
                return!1
                };
        C.prototype.first = C.prototype.$a = function() {
        var a = this.cb;
                return null === a ? null : a.value
                };
        C.prototype.any = function(a) {
        for (var b = this.V, c = this.cb; null !== c; ) {
        if (a(c.value))
                return!0;
                this.V !== b && t.Pb(this);
                c = c.Sb
                }
        return!1
                };
        C.prototype.all = function(a) {
        for (var b = this.V, c = this.cb; null !== c; ) {
        if (!a(c.value))
                return!1;
                this.V !== b && t.Pb(this);
                c = c.Sb
                }
        return!0
                };
        C.prototype.each = function(a) {
        for (var b = this.V, c = this.cb; null !== c; )
                a(c.value), this.V !== b && t.Pb(this), c = c.Sb
                };
        C.prototype.remove = C.prototype["delete"] = C.prototype.remove = function(a) {
if (null === a)
        return!1;
        e && this.Ng(a);
        t.L(this, a);
        var b = a;
        if (t.rb(a) && (b = t.od(a), void 0 === b))
        return!1;
        a = this.ed[b];
        if (void 0 === a)
        return!1;
        var c = a.Sb, d = a.vo;
        null !== c && (c.vo = d);
        null !== d && (d.Sb = c);
        this.cb === a && (this.cb = c);
        this.Ih === a && (this.Ih = d);
        delete this.ed[b];
        this.dd--;
        this.Od();
        return!0
        };
        C.prototype.removeAll = function(a) {
        if (null === a)
                return this;
                t.L(this);
                if (t.isArray(a))
                for (var b = t.vb(a), c = 0; c < b; c++)
                this.remove(t.mb(a, c));
                else
                for (a = a.k; a.next(); )
                this.remove(a.value);
                return this
                };
        C.prototype.retainAll = function(a) {
        if (null === a || 0 === this.count)
                return this;
                t.L(this);
                var b = new C(this.da);
                b.Oe(a);
                a = new B(this.da);
                for (var c = this.k; c.next(); )
                b.contains(c.value) || a.add(c.value);
                for (b = a.k; b.next(); )
                this.remove(b.value);
                return this
                };
        C.prototype.clear = C.prototype.clear = function() {
        t.L(this);
                this.ed = {};
                this.dd = 0;
                this.Ih = this.cb = null;
                this.Od()
                };
        C.prototype.copy = function() {
        var a = new C(this.da), b = this.ed, c;
                for (c in b)
                a.add(b[c].value);
                return a
                };
        C.prototype.toArray = C.prototype.Ie = function() {
        var a = Array(this.dd), b = this.ed, c = 0, d;
                for (d in b)
                a[c] = b[d].value, c++;
                return a
                };
        C.prototype.toList = function() {
        var a = new B(this.da), b = this.ed, c;
                for (c in b)
                a.add(b[c].value);
                return a
                };
        t.A(C, {count: "count"}, function() {
        return this.dd
                });
        t.A(C, {size: "size"}, function() {
        return this.dd
                });
        t.A(C, {k: "iterator"}, function() {
        if (0 >= this.dd)
                return t.Yf;
                var a = this.Ad;
                return null !== a ? (a.reset(), a) : new Da(this)
                });
        function Fa(a) {
        this.Xa = a;
                this.reset()
        }
t.Td(Fa, {key: !0, value: !0});
        t.A(Fa, {k: "iterator"}, function() {
        return this
                });
        Fa.prototype.reset = Fa.prototype.reset = function() {
        this.Ya = this.Xa.V;
                this.yb = null
                };
        Fa.prototype.next = Fa.prototype.hasNext = Fa.prototype.next = function() {
        var a = this.Xa;
                a.V !== this.Ya && t.Pb(a);
                var b = this.yb, b = null === b ? a.cb : b.Sb;
                if (null !== b)
                return this.yb = b, this.value = this.key = a = b.key, !0;
                this.$f();
                return!1
                };
        Fa.prototype.first = Fa.prototype.$a = function() {
        var a = this.Xa;
                this.Ya = a.V;
                a = a.cb;
                return null !== a ? (this.yb = a, this.value = this.key = a = a.key) : null
                };
        Fa.prototype.any = function(a) {
        var b = this.Xa, c = b.V;
                this.yb = null;
                for (var d = b.cb; null !== d; ) {
        if (a(d.key))
                return!0;
                b.V !== c && t.Pb(b);
                d = d.Sb
                }
        return!1
                };
        Fa.prototype.all = function(a) {
        var b = this.Xa, c = b.V;
                this.yb = null;
                for (var d = b.cb; null !== d; ) {
        if (!a(d.key))
                return!1;
                b.V !== c && t.Pb(b);
                d = d.Sb
                }
        return!0
                };
        Fa.prototype.each = function(a) {
        var b = this.Xa, c = b.V;
                this.yb = null;
                for (var d = b.cb; null !== d; )
                a(d.key), b.V !== c && t.Pb(b), d = d.Sb
                };
        t.A(Fa, {count: "count"}, function() {
        return this.Xa.dd
                });
        Fa.prototype.$f = function() {
        this.value = this.key = null;
                this.Ya = - 1
                };
        Fa.prototype.toString = function() {
        return null !== this.yb ? "MapKeySetIterator@" + this.yb.value : "MapKeySetIterator"
                };
        function Ha(a) {
        t.Ac(this);
                this.ob = !0;
                this.Xa = a
        }
t.Ka(Ha, C);
        Ha.prototype.freeze = function() {
        return this
                };
        Ha.prototype.La = function() {
        return this
                };
        Ha.prototype.toString = function() {
        return"MapKeySet(" + this.Xa.toString() + ")"
                };
        Ha.prototype.add = Ha.prototype.set = Ha.prototype.add = function() {
        t.m("This Set is read-only: " + this.toString());
                return!1
                };
        Ha.prototype.contains = Ha.prototype.has = Ha.prototype.contains = function(a) {
        return this.Xa.contains(a)
                };
        Ha.prototype.remove = Ha.prototype["delete"] = Ha.prototype.remove = function() {
t.m("This Set is read-only: " + this.toString());
        return!1
        };
        Ha.prototype.clear = Ha.prototype.clear = function() {
        t.m("This Set is read-only: " + this.toString())
                };
        Ha.prototype.first = Ha.prototype.$a = function() {
        var a = this.Xa.cb;
                return null !== a ? a.key : null
                };
        Ha.prototype.any = function(a) {
        for (var b = this.Xa.cb; null !== b; ) {
        if (a(b.key))
                return!0;
                b = b.Sb
                }
        return!1
                };
        Ha.prototype.all = function(a) {
        for (var b = this.Xa.cb; null !== b; ) {
        if (!a(b.key))
                return!1;
                b = b.Sb
                }
        return!0
                };
        Ha.prototype.each = function(a) {
        for (var b = this.Xa.cb; null !== b; )
                a(b.key), b = b.Sb
                };
        Ha.prototype.copy = function() {
        return new Ha(this.Xa)
                };
        Ha.prototype.toSet = function() {
        var a = new C(this.Xa.Hh), b = this.Xa.ed, c;
                for (c in b)
                a.add(b[c].key);
                return a
                };
        Ha.prototype.toArray = Ha.prototype.Ie = function() {
        var a = this.Xa.ed, b = Array(this.Xa.dd), c = 0, d;
                for (d in a)
                b[c] = a[d].key, c++;
                return b
                };
        Ha.prototype.toList = function() {
        var a = new B(this.da), b = this.Xa.ed, c;
                for (c in b)
                a.add(b[c].key);
                return a
                };
        t.A(Ha, {count: "count"}, function() {
        return this.Xa.dd
                });
        t.A(Ha, {size: "size"}, function() {
        return this.Xa.dd
                });
        t.A(Ha, {k: "iterator"}, function() {
        return 0 >= this.Xa.dd ? t.Yf : new Fa(this.Xa)
                });
        function Ka(a) {
        this.Xa = a;
                this.reset()
        }
t.Td(Ka, {key: !0, value: !0});
        t.A(Ka, {k: "iterator"}, function() {
        return this
                });
        Ka.prototype.reset = Ka.prototype.reset = function() {
        var a = this.Xa;
                a.io = null;
                this.Ya = a.V;
                this.yb = null
                };
        Ka.prototype.next = Ka.prototype.hasNext = Ka.prototype.next = function() {
        var a = this.Xa;
                a.V !== this.Ya && t.Pb(a);
                var b = this.yb, b = null === b ? a.cb : b.Sb;
                if (null !== b)
                return this.yb = b, this.value = b.value, this.key = b.key, !0;
                this.$f();
                return!1
                };
        Ka.prototype.first = Ka.prototype.$a = function() {
        var a = this.Xa;
                this.Ya = a.V;
                a = a.cb;
                if (null !== a) {
        this.yb = a;
                var b = a.value;
                this.key = a.key;
                return this.value = b
                }
        return null
                };
        Ka.prototype.any = function(a) {
        var b = this.Xa;
                b.io = null;
                var c = b.V;
                this.yb = null;
                for (var d = b.cb; null !== d; ) {
        if (a(d.value))
                return!0;
                b.V !== c && t.Pb(b);
                d = d.Sb
                }
        return!1
                };
        Ka.prototype.all = function(a) {
        var b = this.Xa;
                b.io = null;
                var c = b.V;
                this.yb = null;
                for (var d = b.cb; null !== d; ) {
        if (!a(d.value))
                return!1;
                b.V !== c && t.Pb(b);
                d = d.Sb
                }
        return!0
                };
        Ka.prototype.each = function(a) {
        var b = this.Xa;
                b.io = null;
                var c = b.V;
                this.yb = null;
                for (var d = b.cb; null !== d; )
                a(d.value), b.V !== c && t.Pb(b), d = d.Sb
                };
        t.A(Ka, {count: "count"}, function() {
        return this.Xa.dd
                });
        Ka.prototype.$f = function() {
        this.value = this.key = null;
                this.Ya = - 1;
                this.Xa.io = this
                };
        Ka.prototype.toString = function() {
        return null !== this.yb ? "MapValueSetIterator@" + this.yb.value : "MapValueSetIterator"
                };
        function Ea(a, b) {
        this.key = a;
                this.value = b;
                this.vo = this.Sb = null
        }
t.Td(Ea, {key: !0, value: !0});
        Ea.prototype.toString = function() {
        return"{" + this.key + ":" + this.value + "}"
                };
        function La(a) {
        this.Xa = a;
                this.reset()
        }
t.Td(La, {key: !0, value: !0});
        t.A(La, {k: "iterator"}, function() {
        return this
                });
        La.prototype.reset = La.prototype.reset = function() {
        var a = this.Xa;
                a.Ad = null;
                this.Ya = a.V;
                this.yb = null
                };
        La.prototype.next = La.prototype.hasNext = La.prototype.next = function() {
        var a = this.Xa;
                a.V !== this.Ya && t.Pb(a);
                var b = this.yb, b = null === b ? a.cb : b.Sb;
                if (null !== b)
                return this.yb = b, this.key = b.key, this.value = b.value, !0;
                this.$f();
                return!1
                };
        La.prototype.first = La.prototype.$a = function() {
        var a = this.Xa;
                this.Ya = a.V;
                a = a.cb;
                return null !== a ? (this.yb = a, this.key = a.key, this.value = a.value, a) : null
                };
        La.prototype.any = function(a) {
        var b = this.Xa;
                b.Ad = null;
                var c = b.V;
                this.yb = null;
                for (var d = b.cb; null !== d; ) {
        if (a(d))
                return!0;
                b.V !== c && t.Pb(b);
                d = d.Sb
                }
        return!1
                };
        La.prototype.all = function(a) {
        var b = this.Xa;
                b.Ad = null;
                var c = b.V;
                this.yb = null;
                for (var d = b.cb; null !== d; ) {
        if (!a(d))
                return!1;
                b.V !== c && t.Pb(b);
                d = d.Sb
                }
        return!0
                };
        La.prototype.each = function(a) {
        var b = this.Xa;
                b.Ad = null;
                var c = b.V;
                this.yb = null;
                for (var d = b.cb; null !== d; )
                a(d), b.V !== c && t.Pb(b), d = d.Sb
                };
        t.A(La, {count: "count"}, function() {
        return this.Xa.dd
                });
        La.prototype.$f = function() {
        this.value = this.key = null;
                this.Ya = - 1;
                this.Xa.Ad = this
                };
        La.prototype.toString = function() {
        return null !== this.yb ? "MapIterator@" + this.yb : "MapIterator"
                };
        function ja(a, b) {
        t.Ac(this);
                this.ob = !1;
                void 0 === a || null === a ? this.Hh = null : "string" === typeof a ? "object" === a || "string" === a || "number" === a ? this.Hh = a : t.la(a, "the string 'object', 'number' or 'string'", "Map constructor: keytype") : "function" === typeof a ? this.Hh = a === Object ? "object" : a === String ? "string" : a === Number ? "number" : a : t.la(a, "null, a primitive type name, or a class type", "Map constructor: keytype");
                void 0 === b || null === b ? this.Qi = null : "string" === typeof b ? "object" === b || "string" === b || "boolean" === b || "number" ===
                b || "function" === b ? this.Qi = b : t.la(b, "the string 'object', 'number', 'string', 'boolean', or 'function'", "Map constructor: valtype") : "function" === typeof b ? this.Qi = b === Object ? "object" : b === String ? "string" : b === Number ? "number" : b === Boolean ? "boolean" : b === Function ? "function" : b : t.la(b, "null, a primitive type name, or a class type", "Map constructor: valtype");
                this.ed = {};
                this.dd = 0;
                this.io = this.Ad = null;
                this.V = 0;
                this.Ih = this.cb = null
        }
t.ga("Map", ja);
        function Ma(a, b) {
        null !== a.Hh && ("string" === typeof a.Hh ? typeof b === a.Hh && null !== b || t.bc(b, a.Hh) : b instanceof a.Hh || t.bc(b, a.Hh))
        }
ja.prototype.Od = function() {
var a = this.V;
        a++;
        999999999 < a && (a = 0);
        this.V = a
        };
        ja.prototype.freeze = ja.prototype.freeze = function() {
        this.ob = !0;
                return this
                };
        ja.prototype.thaw = ja.prototype.La = function() {
        this.ob = !1;
                return this
                };
        ja.prototype.toString = function() {
        return"Map(" + t.$h(this.Hh) + "," + t.$h(this.Qi) + ")#" + t.od(this)
                };
        ja.prototype.add = ja.prototype.set = ja.prototype.add = function(a, b) {
        e && (Ma(this, a), null !== this.Qi && ("string" === typeof this.Qi ? typeof b === this.Qi && null !== b || t.bc(b, this.Qi) : b instanceof this.Qi || t.bc(b, this.Qi)));
                t.L(this, a);
                var c = a;
                t.rb(a) && (c = t.it(a));
                var d = this.ed[c];
                if (void 0 === d)
                return this.dd++, d = new Ea(a, b), this.ed[c] = d, c = this.Ih, null === c ? this.cb = d : (d.vo = c, c.Sb = d), this.Ih = d, this.Od(), !0;
                d.value = b;
                return!1
                };
        ja.prototype.addAll = ja.prototype.Oe = function(a) {
        if (null === a)
                return this;
                if (t.isArray(a))
                for (var b = t.vb(a), c = 0; c < b; c++) {
        var d = t.mb(a, c);
                this.add(d.key, d.value)
                }
        else
                for (e && t.l(a, ja, ja, "addAll:map"), a = a.k; a.next(); )
                this.add(a.key, a.value);
                return this
                };
        ja.prototype.first = ja.prototype.$a = function() {
        return this.cb
                };
        ja.prototype.any = function(a) {
        for (var b = this.V, c = this.cb; null !== c; ) {
        if (a(c))
                return!0;
                this.V !== b && t.Pb(this);
                c = c.Sb
                }
        return!1
                };
        ja.prototype.all = function(a) {
        for (var b = this.V, c = this.cb; null !== c; ) {
        if (!a(c))
                return!1;
                this.V !== b && t.Pb(this);
                c = c.Sb
                }
        return!0
                };
        ja.prototype.each = function(a) {
        for (var b = this.V, c = this.cb; null !== c; )
                a(c), this.V !== b && t.Pb(this), c = c.Sb
                };
        ja.prototype.contains = ja.prototype.has = ja.prototype.contains = function(a) {
        e && Ma(this, a);
                var b = a;
                return t.rb(a) && (b = t.od(a), void 0 === b) ? !1 : void 0 !== this.ed[b]
                };
        ja.prototype.getValue = ja.prototype.get = ja.prototype.za = function(a) {
        e && Ma(this, a);
                var b = a;
                if (t.rb(a) && (b = t.od(a), void 0 === b))
                return null;
                a = this.ed[b];
                return void 0 === a ? null : a.value
                };
        ja.prototype.remove = ja.prototype["delete"] = ja.prototype.remove = function(a) {
if (null === a)
        return!1;
        e && Ma(this, a);
        t.L(this, a);
        var b = a;
        if (t.rb(a) && (b = t.od(a), void 0 === b))
        return!1;
        a = this.ed[b];
        if (void 0 === a)
        return!1;
        var c = a.Sb, d = a.vo;
        null !== c && (c.vo = d);
        null !== d && (d.Sb = c);
        this.cb === a && (this.cb = c);
        this.Ih === a && (this.Ih = d);
        delete this.ed[b];
        this.dd--;
        this.Od();
        return!0
        };
        ja.prototype.clear = ja.prototype.clear = function() {
        t.L(this);
                this.ed = {};
                this.dd = 0;
                this.Ih = this.cb = null;
                this.Od()
                };
        ja.prototype.copy = function() {
        var a = new ja(this.Hh, this.Qi), b = this.ed, c;
                for (c in b) {
        var d = b[c];
                a.add(d.key, d.value)
                }
        return a
                };
        ja.prototype.toArray = ja.prototype.Ie = function() {
        var a = this.ed, b = Array(this.dd), c = 0, d;
                for (d in a) {
        var f = a[d];
                b[c] = new Ea(f.key, f.value);
                c++
                }
        return b
                };
        ja.prototype.toKeySet = ja.prototype.Dl = function() {
        return new Ha(this)
                };
        t.A(ja, {count: "count"}, function() {
        return this.dd
                });
        t.A(ja, {size: "size"}, function() {
        return this.dd
                });
        t.A(ja, {k: "iterator"}, function() {
        if (0 >= this.count)
                return t.Yf;
                var a = this.Ad;
                return null !== a ? (a.reset(), a) : new La(this)
                });
        t.A(ja, {zK: "iteratorKeys"}, function() {
        return 0 >= this.count ? t.Yf : new Fa(this)
                });
        t.A(ja, {iF: "iteratorValues"}, function() {
        if (0 >= this.count)
                return t.Yf;
                var a = this.io;
                return null !== a ? (a.reset(), a) : new Ka(this)
                });
        function w(a, b) {
        void 0 === a || void 0 === b ? this.y = this.x = 0 : !e || "number" === typeof a && "number" === typeof b ? (this.x = a, this.y = b) : t.m("Invalid arguments to Point constructor")
        }
t.ga("Point", w);
        t.Xh(w);
        t.Td(w, {x: !0, y: !0});
        w.prototype.assign = function(a) {
        this.x = a.x;
                this.y = a.y
                };
        w.prototype.p = function(a, b) {
        this.x = a;
                this.y = b
                };
        w.prototype.setTo = w.prototype.Rp = function(a, b) {
        e && (t.i(a, "number", w, "setTo:x"), t.i(b, "number", w, "setTo:y"));
                t.L(this);
                this.x = a;
                this.y = b;
                return this
                };
        w.prototype.set = w.prototype.set = function(a) {
        e && t.l(a, w, w, "set:p");
                t.L(this);
                this.x = a.x;
                this.y = a.y;
                return this
                };
        w.prototype.copy = function() {
        var a = new w;
                a.x = this.x;
                a.y = this.y;
                return a
                };
        w.prototype.Ja = function() {
        this.ob = !0;
                Object.freeze(this);
                return this
                };
        w.prototype.Z = function() {
        return Object.isFrozen(this) ? this : this.copy().freeze()
                };
        w.prototype.freeze = function() {
        this.ob = !0;
                return this
                };
        w.prototype.La = function() {
        Object.isFrozen(this) && t.m("cannot thaw constant: " + this);
                this.ob = !1;
                return this
                };
        w.parse = function(a) {
        if ("string" === typeof a) {
        a = a.split(" ");
                for (var b = 0, c = 0; "" === a[b]; )
                b++;
                var d = a[b++];
                d && (c = parseFloat(d));
                for (var f = 0; "" === a[b]; )
                b++;
                (d = a[b++]) && (f = parseFloat(d));
                return new w(c, f)
                }
        return new w
                };
        w.stringify = function(a) {
        return a instanceof w ? a.x.toString() + " " + a.y.toString() : a.toString()
                };
        w.prototype.toString = function() {
        return"Point(" + this.x + "," + this.y + ")"
                };
        w.prototype.equals = w.prototype.M = function(a) {
        return a instanceof w ? this.x === a.x && this.y === a.y : !1
                };
        w.prototype.equalTo = function(a, b) {
        return this.x === a && this.y === b
                };
        w.prototype.equalsApprox = w.prototype.sf = function(a) {
        return H.I(this.x, a.x) && H.I(this.y, a.y)
                };
        w.prototype.add = w.prototype.add = function(a) {
        e && t.l(a, w, w, "add:p");
                t.L(this);
                this.x += a.x;
                this.y += a.y;
                return this
                };
        w.prototype.subtract = w.prototype.St = function(a) {
        e && t.l(a, w, w, "subtract:p");
                t.L(this);
                this.x -= a.x;
                this.y -= a.y;
                return this
                };
        w.prototype.offset = w.prototype.offset = function(a, b) {
        e && (t.q(a, w, "offset:dx"), t.q(b, w, "offset:dy"));
                t.L(this);
                this.x += a;
                this.y += b;
                return this
                };
        w.prototype.rotate = w.prototype.rotate = function(a) {
        e && t.q(a, w, "rotate:angle");
                t.L(this);
                if (0 === a)
                return this;
                var b = this.x, c = this.y;
                if (0 === b && 0 === c)
                return this;
                var d;
                90 === a ? (a = 0, d = 1) : 180 === a ? (a = - 1, d = 0) : 270 === a ? (a = 0, d = - 1) : (d = a * Math.PI / 180, a = Math.cos(d), d = Math.sin(d));
                this.x = a * b - d * c;
                this.y = d * b + a * c;
                return this
                };
        w.prototype.scale = w.prototype.scale = function(a, b) {
        e && (t.q(a, w, "scale:sx"), t.q(b, w, "scale:sy"));
                this.x *= a;
                this.y *= b;
                return this
                };
        w.prototype.distanceSquaredPoint = w.prototype.Zj = function(a) {
        e && t.l(a, w, w, "distanceSquaredPoint:p");
                var b = a.x - this.x;
                a = a.y - this.y;
                return b * b + a * a
                };
        w.prototype.distanceSquared = w.prototype.Ys = function(a, b) {
        e && (t.q(a, w, "distanceSquared:px"), t.q(b, w, "distanceSquared:py"));
                var c = a - this.x, d = b - this.y;
                return c * c + d * d
                };
        w.prototype.normalize = w.prototype.normalize = function() {
        t.L(this);
                var a = this.x, b = this.y, c = Math.sqrt(a * a + b * b);
                0 < c && (this.x = a / c, this.y = b / c);
                return this
                };
        w.prototype.directionPoint = w.prototype.Zi = function(a) {
        e && t.l(a, w, w, "directionPoint:p");
                return Oa(a.x - this.x, a.y - this.y)
                };
        w.prototype.direction = w.prototype.direction = function(a, b) {
        e && (t.q(a, w, "direction:px"), t.q(b, w, "direction:py"));
                return Oa(a - this.x, b - this.y)
                };
        function Oa(a, b) {
        if (0 === a)
                return 0 < b ? 90 : 0 > b ? 270 : 0;
                if (0 === b)
                return 0 < a ? 0 : 180;
                if (isNaN(a) || isNaN(b))
                return 0;
                var c = 180 * Math.atan(Math.abs(b / a)) / Math.PI;
                0 > a ? c = 0 > b ? c + 180 : 180 - c : 0 > b && (c = 360 - c);
                return c
        }
w.prototype.projectOntoLineSegment = function(a, b, c, d) {
e && (t.q(a, w, "projectOntoLineSegment:px"), t.q(b, w, "projectOntoLineSegment:py"), t.q(c, w, "projectOntoLineSegment:qx"), t.q(d, w, "projectOntoLineSegment:qy"));
        H.cn(a, b, c, d, this.x, this.y, this);
        return this
        };
        w.prototype.projectOntoLineSegmentPoint = function(a, b) {
        e && (t.l(a, w, w, "projectOntoLineSegmentPoint:p"), t.l(b, w, w, "projectOntoLineSegmentPoint:q"));
                H.cn(a.x, a.y, b.x, b.y, this.x, this.y, this);
                return this
                };
        w.prototype.snapToGrid = function(a, b, c, d) {
        e && (t.q(a, w, "snapToGrid:originx"), t.q(b, w, "snapToGrid:originy"), t.q(c, w, "snapToGrid:cellwidth"), t.q(d, w, "snapToGrid:cellheight"));
                H.ct(this.x, this.y, a, b, c, d, this);
                return this
                };
        w.prototype.snapToGridPoint = function(a, b) {
        e && (t.l(a, w, w, "snapToGridPoint:p"), t.l(b, ga, w, "snapToGridPoint:q"));
                H.ct(this.x, this.y, a.x, a.y, b.width, b.height, this);
                return this
                };
        w.prototype.setRectSpot = w.prototype.Nt = function(a, b) {
        e && (t.l(a, x, w, "setRectSpot:r"), t.l(b, I, w, "setRectSpot:spot"));
                t.L(this);
                this.x = a.x + b.x * a.width + b.offsetX;
                this.y = a.y + b.y * a.height + b.offsetY;
                return this
                };
        w.prototype.setSpot = w.prototype.Ot = function(a, b, c, d, f) {
        e && (t.q(a, w, "setSpot:x"), t.q(b, w, "setSpot:y"), t.q(c, w, "setSpot:w"), t.q(d, w, "setSpot:h"), (0 > c || 0 > d) && t.m("Point.setSpot:Width and height cannot be negative"), t.l(f, I, w, "setSpot:spot"));
                t.L(this);
                this.x = a + f.x * c + f.offsetX;
                this.y = b + f.y * d + f.offsetY;
                return this
                };
        w.prototype.transform = function(a) {
        e && t.l(a, ha, w, "transform:t");
                a.Ta(this);
                return this
                };
        function Qa(a, b) {
        e && t.l(b, ha, w, "transformInverted:t");
                b.ai(a);
                return a
        }
var Ra;
        w.distanceLineSegmentSquared = Ra = function(a, b, c, d, f, g) {
        e && (t.q(a, w, "distanceLineSegmentSquared:px"), t.q(b, w, "distanceLineSegmentSquared:py"), t.q(c, w, "distanceLineSegmentSquared:ax"), t.q(d, w, "distanceLineSegmentSquared:ay"), t.q(f, w, "distanceLineSegmentSquared:bx"), t.q(g, w, "distanceLineSegmentSquared:by"));
                var h = f - c, k = g - d, l = h * h + k * k;
                c -= a;
                d -= b;
                var m = - c * h - d * k;
                if (0 >= m || m >= l)
                return h = f - a, k = g - b, Math.min(c * c + d * d, h * h + k * k);
                a = h * d - k * c;
                return a * a / l
                };
        var Sa;
        w.distanceSquared = Sa = function(a, b, c, d) {
        e && (t.q(a, w, "distanceSquared:px"), t.q(b, w, "distanceSquared:py"), t.q(c, w, "distanceSquared:qx"), t.q(d, w, "distanceSquared:qy"));
                a = c - a;
                b = d - b;
                return a * a + b * b
                };
        var Ua;
        w.direction = Ua = function(a, b, c, d) {
        e && (t.q(a, w, "direction:px"), t.q(b, w, "direction:py"), t.q(c, w, "direction:qx"), t.q(d, w, "direction:qy"));
                a = c - a;
                b = d - b;
                if (0 === a)
                return 0 < b ? 90 : 0 > b ? 270 : 0;
                if (0 === b)
                return 0 < a ? 0 : 180;
                if (isNaN(a) || isNaN(b))
                return 0;
                d = 180 * Math.atan(Math.abs(b / a)) / Math.PI;
                0 > a ? d = 0 > b ? d + 180 : 180 - d : 0 > b && (d = 360 - d);
                return d
                };
        w.prototype.isReal = w.prototype.N = function() {
        return isFinite(this.x) && isFinite(this.y)
                };
        function ga(a, b) {
        void 0 === a || void 0 === b ? this.height = this.width = 0 : !e || "number" === typeof a && (0 <= a || isNaN(a)) && "number" === typeof b && (0 <= b || isNaN(b)) ? (this.width = a, this.height = b) : t.m("Invalid arguments to Size constructor")
        }
t.ga("Size", ga);
        t.Xh(ga);
        t.Td(ga, {width: !0, height: !0});
        ga.prototype.assign = function(a) {
        this.width = a.width;
                this.height = a.height
                };
        ga.prototype.p = function(a, b) {
        this.width = a;
                this.height = b
                };
        ga.prototype.setTo = ga.prototype.Rp = function(a, b) {
        e && (t.i(a, "number", ga, "setTo:w"), t.i(b, "number", ga, "setTo:h"));
                0 > a && t.la(a, ">= 0", ga, "setTo:w");
                0 > b && t.la(b, ">= 0", ga, "setTo:h");
                t.L(this);
                this.width = a;
                this.height = b;
                return this
                };
        ga.prototype.set = ga.prototype.set = function(a) {
        e && t.l(a, ga, ga, "set:s");
                t.L(this);
                this.width = a.width;
                this.height = a.height;
                return this
                };
        ga.prototype.copy = function() {
        var a = new ga;
                a.width = this.width;
                a.height = this.height;
                return a
                };
        ga.prototype.Ja = function() {
        this.ob = !0;
                Object.freeze(this);
                return this
                };
        ga.prototype.Z = function() {
        return Object.isFrozen(this) ? this : this.copy().freeze()
                };
        ga.prototype.freeze = function() {
        this.ob = !0;
                return this
                };
        ga.prototype.La = function() {
        Object.isFrozen(this) && t.m("cannot thaw constant: " + this);
                this.ob = !1;
                return this
                };
        ga.parse = function(a) {
        if ("string" === typeof a) {
        a = a.split(" ");
                for (var b = 0, c = 0; "" === a[b]; )
                b++;
                var d = a[b++];
                d && (c = parseFloat(d));
                for (var f = 0; "" === a[b]; )
                b++;
                (d = a[b++]) && (f = parseFloat(d));
                return new ga(c, f)
                }
        return new ga
                };
        ga.stringify = function(a) {
        return a instanceof ga ? a.width.toString() + " " + a.height.toString() : a.toString()
                };
        ga.prototype.toString = function() {
        return"Size(" + this.width + "," + this.height + ")"
                };
        ga.prototype.equals = ga.prototype.M = function(a) {
        return a instanceof ga ? this.width === a.width && this.height === a.height : !1
                };
        ga.prototype.equalTo = function(a, b) {
        return this.width === a && this.height === b
                };
        ga.prototype.equalsApprox = ga.prototype.sf = function(a) {
        return H.I(this.width, a.width) && H.I(this.height, a.height)
                };
        ga.prototype.isReal = ga.prototype.N = function() {
        return isFinite(this.width) && isFinite(this.height)
                };
        function x(a, b, c, d) {
        void 0 === a ? this.height = this.width = this.y = this.x = 0 : a instanceof w ? b instanceof w ? (this.x = Math.min(a.x, b.x), this.y = Math.min(a.y, b.y), this.width = Math.abs(a.x - b.x), this.height = Math.abs(a.y - b.y)) : b instanceof ga ? (this.x = a.x, this.y = a.y, this.width = b.width, this.height = b.height) : t.m("Incorrect arguments supplied") : !e || "number" === typeof a && "number" === typeof b && "number" === typeof c && (0 <= c || isNaN(c)) && "number" === typeof d && (0 <= d || isNaN(d)) ? (this.x = a, this.y = b, this.width = c, this.height = d) : t.m("Invalid arguments to Rect constructor")
        }
t.ga("Rect", x);
        t.Xh(x);
        t.Td(x, {x: !0, y: !0, width: !0, height: !0});
        x.prototype.assign = function(a) {
        this.x = a.x;
                this.y = a.y;
                this.width = a.width;
                this.height = a.height
                };
        x.prototype.p = function(a, b, c, d) {
        this.x = a;
                this.y = b;
                this.width = c;
                this.height = d
                };
        function Va(a, b, c) {
        a.width = b;
                a.height = c
        }
x.prototype.setTo = x.prototype.Rp = function(a, b, c, d) {
e && (t.i(a, "number", x, "setTo:x"), t.i(b, "number", x, "setTo:y"), t.i(c, "number", x, "setTo:w"), t.i(d, "number", x, "setTo:h"));
        0 > c && t.la(c, ">= 0", x, "setTo:w");
        0 > d && t.la(d, ">= 0", x, "setTo:h");
        t.L(this);
        this.x = a;
        this.y = b;
        this.width = c;
        this.height = d;
        return this
        };
        x.prototype.set = x.prototype.set = function(a) {
        e && t.l(a, x, x, "set:r");
                t.L(this);
                this.x = a.x;
                this.y = a.y;
                this.width = a.width;
                this.height = a.height;
                return this
                };
        x.prototype.setPoint = x.prototype.Bf = function(a) {
        e && t.l(a, w, x, "setPoint:p");
                t.L(this);
                this.x = a.x;
                this.y = a.y;
                return this
                };
        x.prototype.setSize = function(a) {
        e && t.l(a, ga, x, "setSize:s");
                t.L(this);
                this.width = a.width;
                this.height = a.height;
                return this
                };
        x.prototype.copy = function() {
        var a = new x;
                a.x = this.x;
                a.y = this.y;
                a.width = this.width;
                a.height = this.height;
                return a
                };
        x.prototype.Ja = function() {
        this.ob = !0;
                Object.freeze(this);
                return this
                };
        x.prototype.Z = function() {
        return Object.isFrozen(this) ? this : this.copy().freeze()
                };
        x.prototype.freeze = function() {
        this.ob = !0;
                return this
                };
        x.prototype.La = function() {
        Object.isFrozen(this) && t.m("cannot thaw constant: " + this);
                this.ob = !1;
                return this
                };
        x.parse = function(a) {
        if ("string" === typeof a) {
        a = a.split(" ");
                for (var b = 0, c = 0; "" === a[b]; )
                b++;
                var d = a[b++];
                d && (c = parseFloat(d));
                for (var f = 0; "" === a[b]; )
                b++;
                (d = a[b++]) && (f = parseFloat(d));
                for (var g = 0; "" === a[b]; )
                b++;
                (d = a[b++]) && (g = parseFloat(d));
                for (var h = 0; "" === a[b]; )
                b++;
                (d = a[b++]) && (h = parseFloat(d));
                return new x(c, f, g, h)
                }
        return new x
                };
        x.stringify = function(a) {
        return a instanceof x ? a.x.toString() + " " + a.y.toString() + " " + a.width.toString() + " " + a.height.toString() : a.toString()
                };
        x.prototype.toString = function() {
        return"Rect(" + this.x + "," + this.y + "," + this.width + "," + this.height + ")"
                };
        x.prototype.equals = x.prototype.M = function(a) {
        return a instanceof x ? this.x === a.x && this.y === a.y && this.width === a.width && this.height === a.height : !1
                };
        x.prototype.equalTo = function(a, b, c, d) {
        return this.x === a && this.y === b && this.width === c && this.height === d
                };
        x.prototype.equalsApprox = x.prototype.sf = function(a) {
        return H.I(this.x, a.x) && H.I(this.y, a.y) && H.I(this.width, a.width) && H.I(this.height, a.height)
                };
        x.prototype.containsPoint = x.prototype.Ga = function(a) {
        e && t.l(a, w, x, "containsPoint:p");
                return this.x <= a.x && this.x + this.width >= a.x && this.y <= a.y && this.y + this.height >= a.y
                };
        x.prototype.containsRect = x.prototype.Wj = function(a) {
        e && t.l(a, x, x, "containsRect:r");
                return this.x <= a.x && a.x + a.width <= this.x + this.width && this.y <= a.y && a.y + a.height <= this.y + this.height
                };
        x.prototype.contains = x.prototype.contains = function(a, b, c, d) {
        e ? (t.q(a, x, "contains:x"), t.q(b, x, "contains:y"), void 0 === c ? c = 0 : t.q(c, x, "contains:w"), void 0 === d ? d = 0 : t.q(d, x, "contains:h"), (0 > c || 0 > d) && t.m("Rect.contains:Width and height cannot be negative")) : (void 0 === c && (c = 0), void 0 === d && (d = 0));
                return this.x <= a && a + c <= this.x + this.width && this.y <= b && b + d <= this.y + this.height
                };
        x.prototype.reset = function() {
        t.L(this);
                this.height = this.width = this.y = this.x = 0
                };
        x.prototype.offset = x.prototype.offset = function(a, b) {
        e && (t.q(a, x, "offset:dx"), t.q(b, x, "offset:dy"));
                t.L(this);
                this.x += a;
                this.y += b;
                return this
                };
        x.prototype.inflate = x.prototype.Pf = function(a, b) {
        e && (t.q(a, x, "inflate:w"), t.q(b, x, "inflate:h"));
                return Wa(this, b, a, b, a)
                };
        x.prototype.addMargin = x.prototype.Xv = function(a) {
        e && t.l(a, ab, x, "addMargin:m");
                return Wa(this, a.top, a.right, a.bottom, a.left)
                };
        x.prototype.subtractMargin = x.prototype.VJ = function(a) {
        e && t.l(a, ab, x, "subtractMargin:m");
                return Wa(this, - a.top, - a.right, - a.bottom, - a.left)
                };
        x.prototype.grow = function(a, b, c, d) {
        e && (t.q(a, x, "grow:t"), t.q(b, x, "grow:r"), t.q(c, x, "grow:b"), t.q(d, x, "grow:l"));
                return Wa(this, a, b, c, d)
                };
        function Wa(a, b, c, d, f) {
        t.L(a);
                var g = a.width;
                c + f <= - g ? (a.x += g / 2, a.width = 0) : (a.x -= f, a.width += c + f);
                c = a.height;
                b + d <= - c ? (a.y += c / 2, a.height = 0) : (a.y -= b, a.height += b + d);
                return a
        }
x.prototype.intersectRect = function(a) {
e && t.l(a, x, x, "intersectRect:r");
        return cb(this, a.x, a.y, a.width, a.height)
        };
        x.prototype.intersect = function(a, b, c, d) {
        e && (t.q(a, x, "intersect:x"), t.q(b, x, "intersect:y"), t.q(c, x, "intersect:w"), t.q(d, x, "intersect:h"), (0 > c || 0 > d) && t.m("Rect.intersect:Width and height cannot be negative"));
                return cb(this, a, b, c, d)
                };
        function cb(a, b, c, d, f) {
        t.L(a);
                var g = Math.max(a.x, b), h = Math.max(a.y, c);
                b = Math.min(a.x + a.width, b + d);
                c = Math.min(a.y + a.height, c + f);
                a.x = g;
                a.y = h;
                a.width = Math.max(0, b - g);
                a.height = Math.max(0, c - h);
                return a
        }
x.prototype.intersectsRect = x.prototype.Qf = function(a) {
e && t.l(a, x, x, "intersectsRect:r");
        return this.ZE(a.x, a.y, a.width, a.height)
        };
        x.prototype.intersects = x.prototype.ZE = function(a, b, c, d) {
        e && (t.q(a, x, "intersects:x"), t.q(b, x, "intersects:y"), t.q(a, x, "intersects:w"), t.q(b, x, "intersects:h"), (0 > c || 0 > d) && t.m("Rect.intersects:Width and height cannot be negative"));
                var f = this.width, g = this.x;
                if (Infinity !== f && Infinity !== c && (f += g, c += a, isNaN(c) || isNaN(f) || g > c || a > f))
                return!1;
                a = this.height;
                c = this.y;
                return Infinity !== a && Infinity !== d && (a += c, d += b, isNaN(d) || isNaN(a) || c > d || b > a) ? !1 : !0
                };
        function eb(a, b) {
        var c = a.width, d = b.width + 10 + 10, f = a.x, g = b.x - 10;
                if (f > d + g || g > c + f)
                return!1;
                c = a.height;
                d = b.height + 10 + 10;
                f = a.y;
                g = b.y - 10;
                return f > d + g || g > c + f ? !1 : !0
        }
x.prototype.unionPoint = x.prototype.jj = function(a) {
e && t.l(a, w, x, "unionPoint:p");
        return hb(this, a.x, a.y, 0, 0)
        };
        x.prototype.unionRect = x.prototype.kj = function(a) {
        e && t.l(a, x, x, "unionRect:r");
                return hb(this, a.x, a.y, a.width, a.height)
                };
        x.prototype.union = x.prototype.LG = function(a, b, c, d) {
        t.L(this);
                e ? (t.q(a, x, "union:x"), t.q(b, x, "union:y"), void 0 === c ? c = 0 : t.q(c, x, "union:w"), void 0 === d ? d = 0 : t.q(d, x, "union:h"), (0 > c || 0 > d) && t.m("Rect.union:Width and height cannot be negative")) : (void 0 === c && (c = 0), void 0 === d && (d = 0));
                return hb(this, a, b, c, d)
                };
        function hb(a, b, c, d, f) {
        var g = Math.min(a.x, b), h = Math.min(a.y, c);
                b = Math.max(a.x + a.width, b + d);
                c = Math.max(a.y + a.height, c + f);
                a.x = g;
                a.y = h;
                a.width = b - g;
                a.height = c - h;
                return a
        }
x.prototype.setSpot = x.prototype.Ot = function(a, b, c) {
e && (t.q(a, x, "setSpot:x"), t.q(b, x, "setSpot:y"), t.l(c, I, x, "setSpot:spot"));
        t.L(this);
        this.x = a - c.offsetX - c.x * this.width;
        this.y = b - c.offsetY - c.y * this.height;
        return this
        };
        var mb;
        x.contains = mb = function(a, b, c, d, f, g, h, k) {
        e ? (t.q(a, x, "contains:rx"), t.q(b, x, "contains:ry"), t.q(c, x, "contains:rw"), t.q(d, x, "contains:rh"), t.q(f, x, "contains:x"), t.q(g, x, "contains:y"), void 0 === h ? h = 0 : t.q(h, x, "contains:w"), void 0 === k ? k = 0 : t.q(k, x, "contains:h"), (0 > c || 0 > d || 0 > h || 0 > k) && t.m("Rect.contains:Width and height cannot be negative")) : (void 0 === h && (h = 0), void 0 === k && (k = 0));
                return a <= f && f + h <= a + c && b <= g && g + k <= b + d
                };
        x.intersects = function(a, b, c, d, f, g, h, k) {
        e && (t.q(a, x, "intersects:rx"), t.q(b, x, "intersects:ry"), t.q(c, x, "intersects:rw"), t.q(d, x, "intersects:rh"), t.q(f, x, "intersects:x"), t.q(g, x, "intersects:y"), t.q(h, x, "intersects:w"), t.q(k, x, "intersects:h"), (0 > c || 0 > d || 0 > h || 0 > k) && t.m("Rect.intersects:Width and height cannot be negative"));
                c += a;
                h += f;
                if (a > h || f > c)
                return!1;
                a = d + b;
                k += g;
                return b > k || g > a ? !1 : !0
                };
        t.g(x, "left", x.prototype.left);
        t.defineProperty(x, {left: "left"}, function() {
        return this.x
                }, function(a) {
        t.L(this, a);
                e && t.i(a, "number", x, "left");
                this.x = a
                });
        t.g(x, "top", x.prototype.top);
        t.defineProperty(x, {top: "top"}, function() {
        return this.y
                }, function(a) {
        t.L(this, a);
                e && t.i(a, "number", x, "top");
                this.y = a
                });
        t.g(x, "right", x.prototype.right);
        t.defineProperty(x, {right: "right"}, function() {
        return this.x + this.width
                }, function(a) {
        t.L(this, a);
                e && t.q(a, x, "right");
                this.x += a - (this.x + this.width)
                });
        t.g(x, "bottom", x.prototype.bottom);
        t.defineProperty(x, {bottom: "bottom"}, function() {
        return this.y + this.height
                }, function(a) {
        t.L(this, a);
                e && t.q(a, x, "top");
                this.y += a - (this.y + this.height)
                });
        t.g(x, "position", x.prototype.position);
        t.defineProperty(x, {position: "position"}, function() {
        return new w(this.x, this.y)
                }, function(a) {
        t.L(this, a);
                e && t.l(a, w, x, "position");
                this.x = a.x;
                this.y = a.y
                });
        t.g(x, "size", x.prototype.size);
        t.defineProperty(x, {size: "size"}, function() {
        return new ga(this.width, this.height)
                }, function(a) {
        t.L(this, a);
                e && t.l(a, ga, x, "size");
                this.width = a.width;
                this.height = a.height
                });
        t.g(x, "center", x.prototype.Sz);
        t.defineProperty(x, {Sz: "center"}, function() {
        return new w(this.x + this.width / 2, this.y + this.height / 2)
                }, function(a) {
        t.L(this, a);
                e && t.l(a, w, x, "center");
                this.x = a.x - this.width / 2;
                this.y = a.y - this.height / 2
                });
        t.g(x, "centerX", x.prototype.Da);
        t.defineProperty(x, {Da: "centerX"}, function() {
        return this.x + this.width / 2
                }, function(a) {
        t.L(this, a);
                e && t.q(a, x, "centerX");
                this.x = a - this.width / 2
                });
        t.g(x, "centerY", x.prototype.Pa);
        t.defineProperty(x, {Pa: "centerY"}, function() {
        return this.y + this.height / 2
                }, function(a) {
        t.L(this, a);
                e && t.q(a, x, "centerY");
                this.y = a - this.height / 2
                });
        x.prototype.isReal = x.prototype.N = function() {
        return isFinite(this.x) && isFinite(this.y) && isFinite(this.width) && isFinite(this.height)
                };
        x.prototype.isEmpty = function() {
        return 0 === this.width && 0 === this.height
                };
        function ab(a, b, c, d) {
        void 0 === a ? this.left = this.bottom = this.right = this.top = 0 : void 0 === b ? this.left = this.bottom = this.right = this.top = a : void 0 === c ? (d = b, this.top = a, this.right = b, this.bottom = a, this.left = d) : void 0 !== d ? (this.top = a, this.right = b, this.bottom = c, this.left = d) : t.m("Invalid arguments to Margin constructor")
        }
t.ga("Margin", ab);
        t.Xh(ab);
        t.Td(ab, {top: !0, right: !0, bottom: !0, left: !0});
        ab.prototype.assign = function(a) {
        this.top = a.top;
                this.right = a.right;
                this.bottom = a.bottom;
                this.left = a.left
                };
        ab.prototype.setTo = ab.prototype.Rp = function(a, b, c, d) {
        e && (t.i(a, "number", ab, "setTo:t"), t.i(b, "number", ab, "setTo:r"), t.i(c, "number", ab, "setTo:b"), t.i(d, "number", ab, "setTo:l"));
                t.L(this);
                this.top = a;
                this.right = b;
                this.bottom = c;
                this.left = d;
                return this
                };
        ab.prototype.set = ab.prototype.set = function(a) {
        e && t.l(a, ab, ab, "assign:m");
                t.L(this);
                this.top = a.top;
                this.right = a.right;
                this.bottom = a.bottom;
                this.left = a.left;
                return this
                };
        ab.prototype.copy = function() {
        var a = new ab;
                a.top = this.top;
                a.right = this.right;
                a.bottom = this.bottom;
                a.left = this.left;
                return a
                };
        ab.prototype.Ja = function() {
        this.ob = !0;
                Object.freeze(this);
                return this
                };
        ab.prototype.Z = function() {
        return Object.isFrozen(this) ? this : this.copy().freeze()
                };
        ab.prototype.freeze = function() {
        this.ob = !0;
                return this
                };
        ab.prototype.La = function() {
        Object.isFrozen(this) && t.m("cannot thaw constant: " + this);
                this.ob = !1;
                return this
                };
        ab.parse = function(a) {
        if ("string" === typeof a) {
        a = a.split(" ");
                for (var b = 0, c = 0; "" === a[b]; )
                b++;
                var d = a[b++];
                d && (c = parseFloat(d));
                for (var f = void 0; "" === a[b]; )
                b++;
                (d = a[b++]) && (f = parseFloat(d));
                for (var g = void 0; "" === a[b]; )
                b++;
                (d = a[b++]) && (g = parseFloat(d));
                for (var h = void 0; "" === a[b]; )
                b++;
                (d = a[b++]) && (h = parseFloat(d));
                return new ab(c, f, g, h)
                }
        return new ab
                };
        ab.stringify = function(a) {
        return a instanceof ab ? a.top.toString() + " " + a.right.toString() + " " + a.bottom.toString() + " " + a.left.toString() : a.toString()
                };
        ab.prototype.toString = function() {
        return"Margin(" + this.top + "," + this.right + "," + this.bottom + "," + this.left + ")"
                };
        ab.prototype.equals = ab.prototype.M = function(a) {
        return a instanceof ab ? this.top === a.top && this.right === a.right && this.bottom === a.bottom && this.left === a.left : !1
                };
        ab.prototype.equalTo = function(a, b, c, d) {
        return this.top === a && this.right === b && this.bottom === c && this.left === d
                };
        ab.prototype.equalsApprox = ab.prototype.sf = function(a) {
        return H.I(this.top, a.top) && H.I(this.right, a.right) && H.I(this.bottom, a.bottom) && H.I(this.left, a.left)
                };
        ab.prototype.isReal = ab.prototype.N = function() {
        return isFinite(this.top) && isFinite(this.right) && isFinite(this.bottom) && isFinite(this.left)
                };
        function ha() {
        this.m11 = 1;
                this.m21 = this.m12 = 0;
                this.m22 = 1;
                this.dy = this.dx = 0
        }
t.Xh(ha);
        t.Td(ha, {m11: !0, m12: !0, m21: !0, m22: !0, dx: !0, dy: !0});
        ha.prototype.set = ha.prototype.set = function(a) {
        e && t.l(a, ha, ha, "set:t");
                this.m11 = a.m11;
                this.m12 = a.m12;
                this.m21 = a.m21;
                this.m22 = a.m22;
                this.dx = a.dx;
                this.dy = a.dy;
                return this
                };
        ha.prototype.copy = function() {
        var a = new ha;
                a.m11 = this.m11;
                a.m12 = this.m12;
                a.m21 = this.m21;
                a.m22 = this.m22;
                a.dx = this.dx;
                a.dy = this.dy;
                return a
                };
        ha.prototype.toString = function() {
        return"Transform(" + this.m11 + "," + this.m12 + "," + this.m21 + "," + this.m22 + "," + this.dx + "," + this.dy + ")"
                };
        ha.prototype.equals = ha.prototype.M = function(a) {
        return a instanceof ha ? this.m11 === a.m11 && this.m12 === a.m12 && this.m21 === a.m21 && this.m22 === a.m22 && this.dx === a.dx && this.dy === a.dy : !1
                };
        ha.prototype.reset = ha.prototype.reset = function() {
        this.m11 = 1;
                this.m21 = this.m12 = 0;
                this.m22 = 1;
                this.dy = this.dx = 0
                };
        ha.prototype.multiply = ha.prototype.multiply = function(a) {
        e && t.l(a, ha, ha, "multiply:matrix");
                var b = this.m12 * a.m11 + this.m22 * a.m12, c = this.m11 * a.m21 + this.m21 * a.m22, d = this.m12 * a.m21 + this.m22 * a.m22, f = this.m11 * a.dx + this.m21 * a.dy + this.dx, g = this.m12 * a.dx + this.m22 * a.dy + this.dy;
                this.m11 = this.m11 * a.m11 + this.m21 * a.m12;
                this.m12 = b;
                this.m21 = c;
                this.m22 = d;
                this.dx = f;
                this.dy = g;
                return this
                };
        ha.prototype.multiplyInverted = ha.prototype.CF = function(a) {
        e && t.l(a, ha, ha, "multiplyInverted:matrix");
                var b = 1 / (a.m11 * a.m22 - a.m12 * a.m21), c = a.m22 * b, d = - a.m12 * b, f = - a.m21 * b, g = a.m11 * b, h = b * (a.m21 * a.dy - a.m22 * a.dx), k = b * (a.m12 * a.dx - a.m11 * a.dy);
                a = this.m12 * c + this.m22 * d;
                b = this.m11 * f + this.m21 * g;
                f = this.m12 * f + this.m22 * g;
                g = this.m11 * h + this.m21 * k + this.dx;
                h = this.m12 * h + this.m22 * k + this.dy;
                this.m11 = this.m11 * c + this.m21 * d;
                this.m12 = a;
                this.m21 = b;
                this.m22 = f;
                this.dx = g;
                this.dy = h;
                return this
                };
        ha.prototype.invert = ha.prototype.nA = function() {
        var a = 1 / (this.m11 * this.m22 - this.m12 * this.m21), b = - this.m12 * a, c = - this.m21 * a, d = this.m11 * a, f = a * (this.m21 * this.dy - this.m22 * this.dx), g = a * (this.m12 * this.dx - this.m11 * this.dy);
                this.m11 = this.m22 * a;
                this.m12 = b;
                this.m21 = c;
                this.m22 = d;
                this.dx = f;
                this.dy = g
                };
        ha.prototype.rotate = ha.prototype.rotate = function(a, b, c) {
        e && (t.q(a, ha, "rotate:angle"), t.q(b, ha, "rotate:rx"), t.q(c, ha, "rotate:ry"));
                this.translate(b, c);
                var d;
                0 === a ? (a = 1, d = 0) : 90 === a ? (a = 0, d = 1) : 180 === a ? (a = - 1, d = 0) : 270 === a ? (a = 0, d = - 1) : (d = a * Math.PI / 180, a = Math.cos(d), d = Math.sin(d));
                var f = this.m12 * a + this.m22 * d, g = this.m11 * - d + this.m21 * a, h = this.m12 * - d + this.m22 * a;
                this.m11 = this.m11 * a + this.m21 * d;
                this.m12 = f;
                this.m21 = g;
                this.m22 = h;
                this.translate( - b, - c)
                };
        ha.prototype.translate = ha.prototype.translate = function(a, b) {
        e && (t.q(a, ha, "translate:x"), t.q(b, ha, "translate:y"));
                this.dx += this.m11 * a + this.m21 * b;
                this.dy += this.m12 * a + this.m22 * b
                };
        ha.prototype.scale = ha.prototype.scale = function(a, b) {
        void 0 === b && (b = a);
                e && (t.q(a, ha, "translate:sx"), t.q(b, ha, "translate:sy"));
                this.m11 *= a;
                this.m12 *= a;
                this.m21 *= b;
                this.m22 *= b
                };
        ha.prototype.transformPoint = ha.prototype.Ta = function(a) {
        e && t.l(a, w, ha, "transformPoint:p");
                var b = a.x, c = a.y;
                a.x = b * this.m11 + c * this.m21 + this.dx;
                a.y = b * this.m12 + c * this.m22 + this.dy;
                return a
                };
        ha.prototype.invertedTransformPoint = ha.prototype.ai = function(a) {
        e && t.l(a, w, ha, "invertedTransformPoint:p");
                var b = 1 / (this.m11 * this.m22 - this.m12 * this.m21), c = - this.m12 * b, d = this.m11 * b, f = b * (this.m12 * this.dx - this.m11 * this.dy), g = a.x, h = a.y;
                a.x = g * this.m22 * b + h * - this.m21 * b + b * (this.m21 * this.dy - this.m22 * this.dx);
                a.y = g * c + h * d + f;
                return a
                };
        ha.prototype.transformRect = ha.prototype.GG = function(a) {
        e && t.l(a, x, ha, "transformRect:rect");
                var b = a.x, c = a.y, d = b + a.width, f = c + a.height, g = this.m11, h = this.m12, k = this.m21, l = this.m22, m = this.dx, n = this.dy, p = b * g + c * k + m, q = b * h + c * l + n, r = d * g + c * k + m, c = d * h + c * l + n, s = b * g + f * k + m, b = b * h + f * l + n, g = d * g + f * k + m, d = d * h + f * l + n, f = p, h = q, p = Math.min(p, r), f = Math.max(f, r), h = Math.min(h, c), q = Math.max(q, c), p = Math.min(p, s), f = Math.max(f, s), h = Math.min(h, b), q = Math.max(q, b), p = Math.min(p, g), f = Math.max(f, g), h = Math.min(h, d), q = Math.max(q, d);
                a.x = p;
                a.y =
                h;
                a.width = f - p;
                a.height = q - h
                };
        ha.prototype.isIdentity = ha.prototype.pt = function() {
        return 1 === this.m11 && 0 === this.m12 && 0 === this.m21 && 1 === this.m22 && 0 === this.dx && 0 === this.dy
                };
        function I(a, b, c, d) {
        void 0 === a ? this.offsetY = this.offsetX = this.y = this.x = 0 : (void 0 === b && (b = 0), void 0 === c && (c = 0), void 0 === d && (d = 0), this.x = a, this.y = b, this.offsetX = c, this.offsetY = d)
        }
t.ga("Spot", I);
        t.Xh(I);
        t.Td(I, {x: !0, y: !0, offsetX: !0, offsetY: !0});
        I.prototype.assign = function(a) {
        this.x = a.x;
                this.y = a.y;
                this.offsetX = a.offsetX;
                this.offsetY = a.offsetY
                };
        I.prototype.setTo = I.prototype.Rp = function(a, b, c, d) {
        e && (ob(a, "setTo:x"), ob(b, "setTo:y"), pb(c, "setTo:offx"), pb(d, "setTo:offy"));
                t.L(this);
                this.x = a;
                this.y = b;
                this.offsetX = c;
                this.offsetY = d;
                return this
                };
        I.prototype.set = I.prototype.set = function(a) {
        e && t.l(a, I, I, "set:s");
                t.L(this);
                this.x = a.x;
                this.y = a.y;
                this.offsetX = a.offsetX;
                this.offsetY = a.offsetY;
                return this
                };
        I.prototype.copy = function() {
        var a = new I;
                a.x = this.x;
                a.y = this.y;
                a.offsetX = this.offsetX;
                a.offsetY = this.offsetY;
                return a
                };
        I.prototype.Ja = function() {
        this.ob = !0;
                Object.freeze(this);
                return this
                };
        I.prototype.Z = function() {
        return Object.isFrozen(this) ? this : this.copy().freeze()
                };
        I.prototype.freeze = function() {
        this.ob = !0;
                return this
                };
        I.prototype.La = function() {
        Object.isFrozen(this) && t.m("cannot thaw constant: " + this);
                this.ob = !1;
                return this
                };
        function ub(a, b) {
        a.x = NaN;
                a.y = NaN;
                a.offsetX = b;
                return a
        }
function ob(a, b) {
(isNaN(a) || 1 < a || 0 > a) && t.la(a, "0 <= " + b + " <= 1", I, b)
        }
function pb(a, b) {
(isNaN(a) || Infinity === a || - Infinity === a) && t.la(a, "real number, not NaN or Infinity", I, b)
        }
var vb;
        I.parse = vb = function(a) {
        if ("string" === typeof a) {
        a = a.trim();
                if ("None" === a)
                return t.NONE;
                if ("TopLeft" === a)
                return t.Ux;
                if ("Top" === a || "TopCenter" === a || "MiddleTop" === a)
                return t.dq;
                if ("TopRight" === a)
                return t.Wx;
                if ("Left" === a || "LeftCenter" === a || "MiddleLeft" === a)
                return t.aq;
                if ("Center" === a)
                return t.Ix;
                if ("Right" === a || "RightCenter" === a || "MiddleRight" === a)
                return t.bq;
                if ("BottomLeft" === a)
                return t.Dx;
                if ("Bottom" === a || "BottomCenter" === a || "MiddleBottom" === a)
                return t.$p;
                if ("BottomRight" === a)
                return t.Fx;
                if ("TopSide" ===
                        a)
                return t.Yx;
                if ("LeftSide" === a)
                return t.Mx;
                if ("RightSide" === a)
                return t.Sx;
                if ("BottomSide" === a)
                return t.Hx;
                if ("TopBottomSides" === a)
                return t.Tx;
                if ("LeftRightSides" === a)
                return t.Lx;
                if ("TopLeftSides" === a)
                return t.Vx;
                if ("TopRightSides" === a)
                return t.Xx;
                if ("BottomLeftSides" === a)
                return t.Ex;
                if ("BottomRightSides" === a)
                return t.Gx;
                if ("NotTopSide" === a)
                return t.Qx;
                if ("NotLeftSide" === a)
                return t.Ox;
                if ("NotRightSide" === a)
                return t.Px;
                if ("NotBottomSide" === a)
                return t.Nx;
                if ("AllSides" === a)
                return t.Cx;
                if ("Default" ===
                        a)
                return t.Jx;
                a = a.split(" ");
                for (var b = 0, c = 0; "" === a[b]; )
                b++;
                var d = a[b++];
                d && (c = parseFloat(d));
                for (var f = 0; "" === a[b]; )
                b++;
                (d = a[b++]) && (f = parseFloat(d));
                for (var g = 0; "" === a[b]; )
                b++;
                (d = a[b++]) && (g = parseFloat(d));
                for (var h = 0; "" === a[b]; )
                b++;
                (d = a[b++]) && (h = parseFloat(d));
                return new I(c, f, g, h)
                }
        return new I
                };
        I.stringify = function(a) {
        return a instanceof I ? a.vd() ? a.x.toString() + " " + a.y.toString() + " " + a.offsetX.toString() + " " + a.offsetY.toString() : a.toString() : a.toString()
                };
        I.prototype.toString = function() {
        return this.vd() ? 0 === this.offsetX && 0 === this.offsetY ? "Spot(" + this.x + "," + this.y + ")" : "Spot(" + this.x + "," + this.y + "," + this.offsetX + "," + this.offsetY + ")" : this.M(t.NONE) ? "None" : this.M(t.Ux) ? "TopLeft" : this.M(t.dq) ? "Top" : this.M(t.Wx) ? "TopRight" : this.M(t.aq) ? "Left" : this.M(t.Ix) ? "Center" : this.M(t.bq) ? "Right" : this.M(t.Dx) ? "BottomLeft" : this.M(t.$p) ? "Bottom" : this.M(t.Fx) ? "BottomRight" : this.M(t.Yx) ? "TopSide" : this.M(t.Mx) ? "LeftSide" : this.M(t.Sx) ? "RightSide" : this.M(t.Hx) ? "BottomSide" :
                this.M(t.Tx) ? "TopBottomSides" : this.M(t.Lx) ? "LeftRightSides" : this.M(t.Vx) ? "TopLeftSides" : this.M(t.Xx) ? "TopRightSides" : this.M(t.Ex) ? "BottomLeftSides" : this.M(t.Gx) ? "BottomRightSides" : this.M(t.Qx) ? "NotTopSide" : this.M(t.Ox) ? "NotLeftSide" : this.M(t.Px) ? "NotRightSide" : this.M(t.Nx) ? "NotBottomSide" : this.M(t.Cx) ? "AllSides" : this.M(t.Jx) ? "Default" : "None"
                };
        I.prototype.equals = I.prototype.M = function(a) {
        return a instanceof I ? (this.x === a.x || isNaN(this.x) && isNaN(a.x)) && (this.y === a.y || isNaN(this.y) && isNaN(a.y)) && this.offsetX === a.offsetX && this.offsetY === a.offsetY : !1
                };
        I.prototype.opposite = function() {
        return new I(0.5 - (this.x - 0.5), 0.5 - (this.y - 0.5), - this.offsetX, - this.offsetY)
                };
        I.prototype.includesSide = function(a) {
        if (!this.qp() || !a.qp())
                return!1;
                a = a.offsetY;
                return(this.offsetY & a) === a
                };
        I.prototype.isSpot = I.prototype.vd = function() {
        return!isNaN(this.x) && !isNaN(this.y)
                };
        I.prototype.isNoSpot = I.prototype.Ge = function() {
        return isNaN(this.x) || isNaN(this.y)
                };
        I.prototype.isSide = I.prototype.qp = function() {
        return this.Ge() && 1 === this.offsetX && 0 !== this.offsetY
                };
        I.prototype.isDefault = I.prototype.Nc = function() {
        return isNaN(this.x) && isNaN(this.y) && - 1 === this.offsetX && 0 === this.offsetY
                };
        t.ad = 1;
        t.Hc = 2;
        t.Qc = 4;
        t.Pc = 8;
        t.NONE = ub(new I(0, 0, 0, 0), 0).Ja();
        t.Jx = ub(new I(0, 0, - 1, 0), - 1).Ja();
        t.Ux = (new I(0, 0, 0, 0)).Ja();
        t.dq = (new I(0.5, 0, 0, 0)).Ja();
        t.Wx = (new I(1, 0, 0, 0)).Ja();
        t.aq = (new I(0, 0.5, 0, 0)).Ja();
        t.Ix = (new I(0.5, 0.5, 0, 0)).Ja();
        t.bq = (new I(1, 0.5, 0, 0)).Ja();
        t.Dx = (new I(0, 1, 0, 0)).Ja();
        t.$p = (new I(0.5, 1, 0, 0)).Ja();
        t.Fx = (new I(1, 1, 0, 0)).Ja();
        t.Yx = ub(new I(0, 0, 1, t.ad), 1).Ja();
        t.Mx = ub(new I(0, 0, 1, t.Hc), 1).Ja();
        t.Sx = ub(new I(0, 0, 1, t.Qc), 1).Ja();
        t.Hx = ub(new I(0, 0, 1, t.Pc), 1).Ja();
        t.Tx = ub(new I(0, 0, 1, t.ad | t.Pc), 1).Ja();
        t.Lx = ub(new I(0, 0, 1, t.Hc | t.Qc), 1).Ja();
        t.Vx = ub(new I(0, 0, 1, t.ad | t.Hc), 1).Ja();
        t.Xx = ub(new I(0, 0, 1, t.ad | t.Qc), 1).Ja();
        t.Ex = ub(new I(0, 0, 1, t.Pc | t.Hc), 1).Ja();
        t.Gx = ub(new I(0, 0, 1, t.Pc | t.Qc), 1).Ja();
        t.Qx = ub(new I(0, 0, 1, t.Hc | t.Qc | t.Pc), 1).Ja();
        t.Ox = ub(new I(0, 0, 1, t.ad | t.Qc | t.Pc), 1).Ja();
        t.Px = ub(new I(0, 0, 1, t.ad | t.Hc | t.Pc), 1).Ja();
        t.Nx = ub(new I(0, 0, 1, t.ad | t.Hc | t.Qc), 1).Ja();
        t.Cx = ub(new I(0, 0, 1, t.ad | t.Hc | t.Qc | t.Pc), 1).Ja();
        var wb;
        I.None = wb = t.NONE;
        var xb;
        I.Default = xb = t.Jx;
        var Eb;
        I.TopLeft = Eb = t.Ux;
        var Fb;
        I.TopCenter = Fb = t.dq;
        var Gb;
        I.TopRight = Gb = t.Wx;
        I.LeftCenter = t.aq;
        var Kb;
        I.Center = Kb = t.Ix;
        I.RightCenter = t.bq;
        var Lb;
        I.BottomLeft = Lb = t.Dx;
        var Ob;
        I.BottomCenter = Ob = t.$p;
        var Pb;
        I.BottomRight = Pb = t.Fx;
        var Tb;
        I.MiddleTop = Tb = t.dq;
        var Ub;
        I.MiddleLeft = Ub = t.aq;
        var Vb;
        I.MiddleRight = Vb = t.bq;
        var Wb;
        I.MiddleBottom = Wb = t.$p;
        I.Top = t.dq;
        var Xb;
        I.Left = Xb = t.aq;
        var Yb;
        I.Right = Yb = t.bq;
        I.Bottom = t.$p;
        var $b;
        I.TopSide = $b = t.Yx;
        var ac;
        I.LeftSide = ac = t.Mx;
        var bc;
        I.RightSide = bc = t.Sx;
        var cc;
        I.BottomSide = cc = t.Hx;
        I.TopBottomSides = t.Tx;
        I.LeftRightSides = t.Lx;
        I.TopLeftSides = t.Vx;
        I.TopRightSides = t.Xx;
        I.BottomLeftSides = t.Ex;
        I.BottomRightSides = t.Gx;
        I.NotTopSide = t.Qx;
        I.NotLeftSide = t.Ox;
        I.NotRightSide = t.Px;
        I.NotBottomSide = t.Nx;
        var gc;
        I.AllSides = gc = t.Cx;
        function hc() {
        this.cf = [1, 0, 0, 1, 0, 0]
        }
hc.prototype.copy = function() {
var a = new hc;
        a.cf[0] = this.cf[0];
        a.cf[1] = this.cf[1];
        a.cf[2] = this.cf[2];
        a.cf[3] = this.cf[3];
        a.cf[4] = this.cf[4];
        a.cf[5] = this.cf[5];
        return a
        };
        function mc(a) {
        this.type = a;
                this.r2 = this.y2 = this.x2 = this.r1 = this.y1 = this.x1 = 0;
                this.XD = []
        }
mc.prototype.addColorStop = function(a, b) {
this.XD.push({offset: a, color: b})
        };
        function nc(a, b, c) {
        this.fillStyle = "#000000";
                this.font = "10px sans-serif";
                this.globalAlpha = 1;
                this.lineCap = "butt";
                this.Vw = 0;
                this.lineJoin = "miter";
                this.lineWidth = 1;
                this.miterLimit = 10;
                this.shadowBlur = 0;
                this.shadowColor = "rgba(0, 0, 0, 0)";
                this.shadowOffsetY = this.shadowOffsetX = 0;
                this.strokeStyle = "#000000";
                this.textAlign = "start";
                this.document = b || document;
                this.wE = c;
                this.Rw = null;
                this.path = [];
                this.Yi = new hc;
                this.stack = [];
                this.uf = [];
                this.nG = this.JE = this.hw = 0;
                this.vw = a;
                this.qJ = "http://www.w3.org/2000/svg";
                this.width =
                this.vw.width;
                this.height = this.vw.height;
                this.zl = qc(this, "svg", {width: this.width + "px", height: this.height + "px", RK: "0 0 " + this.vw.width + " " + this.vw.height});
                this.zl.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns", "http://www.w3.org/2000/svg");
                this.zl.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink");
                rc(this, 1, 0, 0, 1, 0, 0);
                a = qc(this, "clipPath", {id: "mainClip"});
                a.appendChild(qc(this, "rect", {x: 0, y: 0, width: this.width, height: this.height}));
                this.zl.appendChild(a);
                this.uf[0].setAttributeNS(null, "clip-path", "url(#mainClip)")
        }
aa = nc.prototype;
        aa.arc = function(a, b, c, d, f, g) {
        sc(this, a, b, c, d, f, g)
                };
        aa.beginPath = function() {
        this.path = []
                };
        aa.bezierCurveTo = function(a, b, c, d, f, g) {
        this.path.push(["C", a, b, c, d, f, g])
                };
        aa.clearRect = function() {
        };
        aa.clip = function() {
        tc(this, "clipPath", this.path, new hc)
                };
        aa.closePath = function() {
        this.path.push(["z"])
                };
        aa.createLinearGradient = function(a, b, c, d) {
        var f = new mc("linear");
                f.x1 = a;
                f.y1 = b;
                f.x2 = c;
                f.y2 = d;
                return f
                };
        aa.createPattern = function() {
        };
        aa.createRadialGradient = function(a, b, c, d, f, g) {
        var h = new mc("radial");
                h.x1 = a;
                h.y1 = b;
                h.r1 = c;
                h.x2 = d;
                h.y2 = f;
                h.r2 = g;
                return h
                };
        aa.drawImage = function(a, b, c, d, f, g, h, k, l) {
        a = [b, c, d, f, g, h, k, l, a];
                b = this.Yi;
                f = a[8];
                c = {x: 0, y: 0, width: f.naturalWidth, height: f.naturalHeight, href: f.src};
                d = "";
                g = a[6] / a[2];
                h = a[7] / a[3];
                if (0 !== a[4] || 0 !== a[5])
                d += " translate(" + a[4] + ", " + a[5] + ")";
                if (1 !== g || 1 !== h)
                d += " scale(" + g + ", " + h + ")";
                if (0 !== a[0] || 0 !== a[1])
                d += " translate(" + - a[0] + ", " + - a[1] + ")";
                if (0 !== a[0] || 0 !== a[1] || a[2] !== f.naturalWidth || a[3] !== f.naturalHeight)
                f = "CLIP" + this.hw, this.hw++, g = qc(this, "clipPath", {id: f}), g.appendChild(qc(this, "rect", {x: a[0], y: a[1],
                width: a[2], height: a[3]})), this.zl.appendChild(g), c["clip-path"] = "url(#" + f + ")";
                uc(this, "image", c, b, d);
                this.addElement("image", c)
                };
        aa.fill = function() {
        tc(this, "fill", this.path, this.Yi)
                };
        aa.fillRect = function(a, b, c, d) {
        vc(this, "fill", [a, b, c, d], this.Yi)
                };
        aa.fillText = function(a, b, c) {
        a = [a, b, c];
                b = this.textAlign;
                "left" === b ? b = "start" : "right" === b ? b = "end" : "center" === b && (b = "middle");
                b = {x: a[1], y: a[2], style: "font: " + this.font, "text-anchor": b};
                uc(this, "fill", b, this.Yi);
                this.addElement("text", b, a[0])
                };
        aa.lineTo = function(a, b) {
        this.path.push(["L", a, b])
                };
        aa.moveTo = function(a, b) {
        this.path.push(["M", a, b])
                };
        aa.quadraticCurveTo = function(a, b, c, d) {
        this.path.push(["Q", a, b, c, d])
                };
        aa.rect = function(a, b, c, d) {
        this.path.push(["M", a, b], ["L", a + c, b], ["L", a + c, b + d], ["L", a, b + d], ["z"])
                };
        aa.restore = function() {
        this.Yi = this.stack.pop();
                this.path = this.stack.pop();
                var a = this.stack.pop();
                this.fillStyle = a.fillStyle;
                this.font = a.font;
                this.globalAlpha = a.globalAlpha;
                this.lineCap = a.lineCap;
                this.Vw = a.Vw;
                this.lineJoin = a.lineJoin;
                this.lineWidth = a.lineWidth;
                this.miterLimit = a.miterLimit;
                this.shadowBlur = a.shadowBlur;
                this.shadowColor = a.shadowColor;
                this.shadowOffsetX = a.shadowOffsetX;
                this.shadowOffsetY = a.shadowOffsetY;
                this.strokeStyle = a.strokeStyle;
                this.textAlign = a.textAlign
                };
        aa.save = function() {
        this.stack.push({fillStyle: this.fillStyle, font: this.font, globalAlpha: this.globalAlpha, lineCap: this.lineCap, Vw: this.Vw, lineJoin: this.lineJoin, lineWidth: this.lineWidth, miterLimit: this.miterLimit, shadowBlur: this.shadowBlur, shadowColor: this.shadowColor, shadowOffsetX: this.shadowOffsetX, shadowOffsetY: this.shadowOffsetY, strokeStyle: this.strokeStyle, textAlign: this.textAlign});
                for (var a = [], b = 0; b < this.path.length; b++)
                a.push(this.path[b]);
                this.stack.push(a);
                this.stack.push(this.Yi.copy())
                };
        aa.setTransform = function(a, b, c, d, f, g) {
        1 === a && 0 === b && 0 === c && 1 === d && 0 === f && 0 === g || rc(this, a, b, c, d, f, g)
                };
        aa.scale = function() {
        };
        aa.stroke = function() {
        tc(this, "stroke", this.path, this.Yi)
                };
        aa.strokeRect = function(a, b, c, d) {
        vc(this, "stroke", [a, b, c, d], this.Yi)
                };
        function qc(a, b, c, d) {
        a = a.document.createElementNS(a.qJ, b);
                if (c)
                for (var f in c)
                a.setAttributeNS("href" === f ? "http://www.w3.org/1999/xlink" : "", f, c[f]);
                d && (a.textContent = d);
                return a
        }
aa.addElement = function(a, b, c) {
a = qc(this, a, b, c);
        0 < this.uf.length ? this.uf[this.uf.length - 1].appendChild(a) : this.zl.appendChild(a);
        return this.Rw = a
        };
        function uc(a, b, c, d, f) {
        1 !== a.globalAlpha && (c.opacity = a.globalAlpha);
                "fill" == b ? (/^rgba\(/.test(a.fillStyle) ? (a = /^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.fillStyle), c.fill = "rgb(" + a[1] + "," + a[2] + "," + a[3] + ")", c["fill-opacity"] = a[4]) : c.fill = a.fillStyle instanceof mc ? yc(a, a.fillStyle) : a.fillStyle, c.stroke = "none") : "stroke" == b && (c.fill = "none", /^rgba\(/.test(a.strokeStyle) ? (b = /^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(a.strokeStyle),
                c.stroke = "rgb(" + b[1] + "," + b[2] + "," + b[3] + ")", c["stroke-opacity"] = b[4]) : c.stroke = a.strokeStyle instanceof mc ? yc(a, a.strokeStyle) : a.strokeStyle, c["stroke-width"] = a.lineWidth, c["stroke-linecap"] = a.lineCap, c["stroke-linejoin"] = a.lineJoin, c["stroke-miterlimit"] = a.miterLimit);
                d = d.cf;
                d = "matrix(" + d[0] + ", " + d[1] + ", " + d[2] + ", " + d[3] + ", " + d[4] + ", " + d[5] + ")";
                void 0 !== f && (d += f);
                c.transform = d
        }
function yc(a, b) {
var c = "GRAD" + a.JE;
        a.JE++;
        var d;
        if ("linear" === b.type)
        d = {x1: b.x1, x2: b.x2, y1: b.y1, y2: b.y2, id: c, gradientUnits: "userSpaceOnUse"}, d = qc(a, "linearGradient", d);
        else if ("radial" === b.type)
        d = {x1: b.x1, x2: b.x2, y1: b.y1, y2: b.y2, r1: b.r1, r2: b.r2, id: c}, d = qc(a, "radialGradient", d);
        else
        throw Error("invalid gradient");
        for (var f = b.XD, g = f.length, h = [], k = 0; k < g; k++) {
var l = f[k], m = l.color, l = {offset: l.offset, "stop-color": m};
        /^rgba\(/.test(m) && (m = /^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(m),
        l["stop-color"] = "rgb(" + m[1] + "," + m[2] + "," + m[3] + ")", l["stop-opacity"] = m[4]);
        h.push(l)
        }
h.sort(function(a, b) {
return a.offset > b.offset ? 1 : - 1
        });
        for (k = 0; k < g; k++)
        d.appendChild(qc(a, "stop", h[k]));
        a.zl.appendChild(d);
        return"url(#" + c + ")"
        }
function vc(a, b, c, d) {
c = {x: c[0], y: c[1], width: c[2], height: c[3]};
        uc(a, b, c, d);
        a.addElement("rect", c)
        }
function tc(a, b, c, d) {
for (var f = [], g = 0; g < c.length; g++) {
var h = Array.prototype.slice.call(c[g]), k = [h.shift()];
        if ("A" == k[0])
        k.push(h.shift() + "," + h.shift(), h.shift(), h.shift() + "," + h.shift(), h.shift() + "," + h.shift());
        else
        for (; h.length; )
        k.push(h.shift() + "," + h.shift());
        f.push(k.join(" "))
        }
c = {d: f.join(" ")};
        uc(a, b, c, d);
        "clipPath" === b ? (b = "CLIP" + a.hw, a.hw++, d = qc(a, "clipPath", {id: b}), d.appendChild(qc(a, "path", c)), a.zl.appendChild(d), 0 < a.uf.length && a.uf[a.uf.length - 1].setAttributeNS(null, "clip-path", "url(#" + b +
                ")")) : a.addElement("path", c)
        }
function sc(a, b, c, d, f, g, h) {
var k = Math.abs(f - g);
        if (f != g) {
var l = b + d * Math.cos(g);
        g = c + d * Math.sin(g);
        k >= 2 * Math.PI ? (sc(a, b, c, d, f, f + Math.PI, h), sc(a, b, c, d, f + Math.PI, f + 2 * Math.PI, h), a.path.push(["M", l, g])) : (b += d * Math.cos(f), c += d * Math.sin(f), k = 180 * k / Math.PI, f = h ? 0 : 1, h = 180 <= k == !!h ? 0 : 1, 0 !== a.path.length ? a.path.push(["L", b, c]) : a.path.push(["M", b, c]), a.path.push(["A", d, d, k, h, f, l, g]))
        }
}
function rc(a, b, c, d, f, g, h) {
var k = new hc;
        k.cf = [b, c, d, f, g, h];
        b = {};
        uc(a, "g", b, k);
        k = a.addElement("g", b);
        a.uf.push(k)
        }
aa.bb = function() {
var a = "SHADOW" + this.nG;
        this.nG++;
        var b = this.addElement("filter", {id: a, width: "250%", height: "250%"}, null), c, d, f, g, h;
        if (0 !== this.shadowOffsetX || 0 !== this.shadowOffsetY)
        c = qc(this, "feGaussianBlur", {"in": "SourceAlpha", result: "blur", OK: this.shadowBlur / 2}), d = qc(this, "feFlood", {"in": "blur", result: "flood", "flood-color": this.shadowColor}), f = qc(this, "feComposite", {"in": "flood", in2: "blur", operator: "in", result: "comp"}), g = qc(this, "feOffset", {"in": "comp", result: "offsetBlur", dx: this.shadowOffsetX,
        dy: this.shadowOffsetY}), h = qc(this, "feMerge", {}), h.appendChild(qc(this, "feMergeNode", {"in": "offsetBlur"})), h.appendChild(qc(this, "feMergeNode", {"in": "SourceGraphic"})), b.appendChild(c), b.appendChild(d), b.appendChild(f), b.appendChild(g), b.appendChild(h);
        0 < this.uf.length && this.uf[this.uf.length - 1].setAttributeNS(null, "filter", "url(#" + a + ")")
        };
        var H = {va: 4 * ((Math.sqrt(2) - 1) / 3), mj: (new w(0, 0)).Ja(), eH: (new x(0, 0, 0, 0)).Ja(), eq: (new ab(0, 0, 0, 0)).Ja(), cH: (new ab(2, 2, 2, 2)).Ja(), dH: (new ga(Infinity, Infinity)).Ja(), aH: (new w( - Infinity, - Infinity)).Ja(), $G: (new w(Infinity, Infinity)).Ja(), fq: (new ga(0, 0)).Ja(), Rx: (new ga(1, 1)).Ja(), cq: (new ga(6, 6)).Ja(), Kx: (new ga(8, 8)).Ja(), bH: (new w(NaN, NaN)).Ja(), xB: null, sqrt: function(a) {
        if (0 >= a)
                return 0;
                var b = H.xB;
                if (null === b) {
        for (var b = [], c = 0; 2E3 >= c; c++)
                b[c] = Math.sqrt(c);
                H.xB = b
                }
        return 1 > a ? (c = 1 / a, 2E3 >= c ? 1 / b[c |
                0] : Math.sqrt(a)) : 2E3 >= a ? b[a | 0] : Math.sqrt(a)
                }, I: function(a, b) {
        var c = a - b;
                return 0.5 > c && - 0.5 < c
                }, nb: function(a, b) {
        var c = a - b;
                return 5E-8 > c && - 5E-8 < c
                }, Kd: function(a, b, c, d, f, g, h) {
        0 >= f && (f = 1E-6);
                var k, l, m, n;
                a < c ? (l = a, k = c) : (l = c, k = a);
                b < d ? (n = b, m = d) : (n = d, m = b);
                if (a === c)
                return n <= h && h <= m && a - f <= g && g <= a + f;
                if (b === d)
                return l <= g && g <= k && b - f <= h && h <= b + f;
                k += f;
                l -= f;
                if (l <= g && g <= k && (m += f, n -= f, n <= h && h <= m))
                if (k - l > m - n)
                if (a - c > f || c - a > f) {
        if (g = (d - b) / (c - a) * (g - a) + b, g - f <= h && h <= g + f)
                return!0
                } else
                return!0;
                else if (b - d > f || d - b > f) {
        if (h = (c -
                a) / (d - b) * (h - b) + a, h - f <= g && g <= h + f)
                return!0
                } else
                return!0;
                return!1
                }, cw: function(a, b, c, d, f, g, h, k, l, m, n, p) {
        if (H.Kd(a, b, h, k, p, c, d) && H.Kd(a, b, h, k, p, f, g))
                return H.Kd(a, b, h, k, p, m, n);
                var q = (a + c) / 2, r = (b + d) / 2, s = (c + f) / 2, u = (d + g) / 2;
                f = (f + h) / 2;
                g = (g + k) / 2;
                d = (q + s) / 2;
                c = (r + u) / 2;
                var s = (s + f) / 2, u = (u + g) / 2, v = (d + s) / 2, D = (c + u) / 2;
                return H.cw(a, b, q, r, d, c, v, D, l, m, n, p) || H.cw(v, D, s, u, f, g, h, k, l, m, n, p)
                }, ZH: function(a, b, c, d, f, g, h, k, l) {
        var m = (c + f) / 2, n = (d + g) / 2;
                l.x = (((a + c) / 2 + m) / 2 + (m + (f + h) / 2) / 2) / 2;
                l.y = (((b + d) / 2 + n) / 2 + (n + (g + k) / 2) / 2) / 2;
                return l
                },
                YH: function(a, b, c, d, f, g, h, k) {
                var l = (c + f) / 2, m = (d + g) / 2;
                        return Ua(((a + c) / 2 + l) / 2, ((b + d) / 2 + m) / 2, (l + (f + h) / 2) / 2, (m + (g + k) / 2) / 2)
                        }, So: function(a, b, c, d, f, g, h, k, l, m) {
        if (H.Kd(a, b, h, k, l, c, d) && H.Kd(a, b, h, k, l, f, g))
                hb(m, a, b, 0, 0), hb(m, h, k, 0, 0);
                else {
                var n = (a + c) / 2, p = (b + d) / 2, q = (c + f) / 2, r = (d + g) / 2;
                        f = (f + h) / 2;
                        g = (g + k) / 2;
                        d = (n + q) / 2;
                        c = (p + r) / 2;
                        var q = (q + f) / 2, r = (r + g) / 2, s = (d + q) / 2, u = (c + r) / 2;
                        H.So(a, b, n, p, d, c, s, u, l, m);
                        H.So(s, u, q, r, f, g, h, k, l, m)
                        }
        return m
                }, ze: function(a, b, c, d, f, g, h, k, l, m) {
        if (H.Kd(a, b, h, k, l, c, d) && H.Kd(a, b, h, k, l, f, g))
                0 ===
                m.length && m.push([a, b]), m.push([h, k]);
                else {
                var n = (a + c) / 2, p = (b + d) / 2, q = (c + f) / 2, r = (d + g) / 2;
                        f = (f + h) / 2;
                        g = (g + k) / 2;
                        d = (n + q) / 2;
                        c = (p + r) / 2;
                        var q = (q + f) / 2, r = (r + g) / 2, s = (d + q) / 2, u = (c + r) / 2;
                        H.ze(a, b, n, p, d, c, s, u, l, m);
                        H.ze(s, u, q, r, f, g, h, k, l, m)
                        }
        return m
                }, PA: function(a, b, c, d, f, g, h, k, l, m) {
        if (H.Kd(a, b, f, g, m, c, d))
                return H.Kd(a, b, f, g, m, k, l);
                var n = (a + c) / 2, p = (b + d) / 2;
                c = (c + f) / 2;
                d = (d + g) / 2;
                var q = (n + c) / 2, r = (p + d) / 2;
                return H.PA(a, b, n, p, q, r, h, k, l, m) || H.PA(q, r, c, d, f, g, h, k, l, m)
                }, NK: function(a, b, c, d, f, g, h) {
        h.x = ((a + c) / 2 + (c + f) / 2) / 2;
                h.y = ((b +
                        d) / 2 + (d + g) / 2) / 2;
                return h
                }, OA: function(a, b, c, d, f, g, h, k) {
        if (H.Kd(a, b, f, g, h, c, d))
                hb(k, a, b, 0, 0), hb(k, f, g, 0, 0);
                else {
                var l = (a + c) / 2, m = (b + d) / 2;
                        c = (c + f) / 2;
                        d = (d + g) / 2;
                        var n = (l + c) / 2, p = (m + d) / 2;
                        H.OA(a, b, l, m, n, p, h, k);
                        H.OA(n, p, c, d, f, g, h, k)
                        }
        return k
                }, Ip: function(a, b, c, d, f, g, h, k) {
        if (H.Kd(a, b, f, g, h, c, d))
                0 === k.length && k.push([a, b]), k.push([f, g]);
                else {
                var l = (a + c) / 2, m = (b + d) / 2;
                        c = (c + f) / 2;
                        d = (d + g) / 2;
                        var n = (l + c) / 2, p = (m + d) / 2;
                        H.Ip(a, b, l, m, n, p, h, k);
                        H.Ip(n, p, c, d, f, g, h, k)
                        }
        return k
                }, Ps: function(a, b, c, d, f, g, h, k, l, m, n, p, q, r) {
        0 >= q &&
                (q = 1E-6);
                if (H.Kd(a, b, h, k, q, c, d) && H.Kd(a, b, h, k, q, f, g)) {
        var s = (a - h) * (m - p) - (b - k) * (l - n);
                if (!s)
                return!1;
                q = ((a * k - b * h) * (l - n) - (a - h) * (l * p - m * n)) / s;
                s = ((a * k - b * h) * (m - p) - (b - k) * (l * p - m * n)) / s;
                if ((l > n ? l - n : n - l) < (m > p ? m - p : p - m)) {
        if (b < k ? (l = b, h = k) : (l = k, h = b), s < l || s > h)
                return!1
                } else if (a < h ? l = a : (l = h, h = a), q < l || q > h)
                return!1;
                r.x = q;
                r.y = s;
                return!0
                }
        var s = (a + c) / 2, u = (b + d) / 2;
                c = (c + f) / 2;
                d = (d + g) / 2;
                f = (f + h) / 2;
                g = (g + k) / 2;
                var v = (s + c) / 2, D = (u + d) / 2;
                c = (c + f) / 2;
                d = (d + g) / 2;
                var A = (v + c) / 2, G = (D + d) / 2, L = (n - l) * (n - l) + (p - m) * (p - m), N = !1;
                H.Ps(a, b, s, u, v, D, A, G,
                        l, m, n, p, q, r) && (a = (r.x - l) * (r.x - l) + (r.y - m) * (r.y - m), a < L && (L = a, N = !0));
                b = r.x;
                s = r.y;
                H.Ps(A, G, c, d, f, g, h, k, l, m, n, p, q, r) && (a = (r.x - l) * (r.x - l) + (r.y - m) * (r.y - m), a < L ? N = !0 : (r.x = b, r.y = s));
                return N
                }, Qs: function(a, b, c, d, f, g, h, k, l, m, n, p, q) {
        var r = 0;
                0 >= q && (q = 1E-6);
                if (H.Kd(a, b, h, k, q, c, d) && H.Kd(a, b, h, k, q, f, g)) {
        q = (a - h) * (m - p) - (b - k) * (l - n);
                if (!q)
                return r;
                var s = ((a * k - b * h) * (l - n) - (a - h) * (l * p - m * n)) / q, u = ((a * k - b * h) * (m - p) - (b - k) * (l * p - m * n)) / q;
                if (s >= n)
                return r;
                if ((l > n ? l - n : n - l) < (m > p ? m - p : p - m)) {
        if (b < k ? (l = b, a = k) : (l = k, a = b), u < l || u > a)
                return r
                } else if (a <
                h ? (l = a, a = h) : l = h, s < l || s > a)
                return r;
                0 < q ? r++ : 0 > q && r--
                } else {
        var s = (a + c) / 2, u = (b + d) / 2, v = (c + f) / 2, D = (d + g) / 2;
                f = (f + h) / 2;
                g = (g + k) / 2;
                d = (s + v) / 2;
                c = (u + D) / 2;
                var v = (v + f) / 2, D = (D + g) / 2, A = (d + v) / 2, G = (c + D) / 2, r = r + H.Qs(a, b, s, u, d, c, A, G, l, m, n, p, q), r = r + H.Qs(A, G, v, D, f, g, h, k, l, m, n, p, q)
                }
        return r
                }, cn: function(a, b, c, d, f, g, h) {
        if (H.nb(a, c)) {
        var k;
                b < d ? (k = b, c = d) : (k = d, c = b);
                d = g;
                if (d < k)
                return h.x = a, h.y = k, !1;
                if (d > c)
                return h.x = a, h.y = c, !1;
                h.x = a;
                h.y = d;
                return!0
                }
        if (H.nb(b, d)) {
        a < c ? k = a : (k = c, c = a);
                d = f;
                if (d < k)
                return h.x = k, h.y = b, !1;
                if (d > c)
                return h.x =
                c, h.y = b, !1;
                h.x = d;
                h.y = b;
                return!0
                }
        k = ((a - f) * (a - c) + (b - g) * (b - d)) / ((c - a) * (c - a) + (d - b) * (d - b));
                if ( - 5E-6 > k)
                return h.x = a, h.y = b, !1;
                if (1.000005 < k)
                return h.x = c, h.y = d, !1;
                h.x = a + k * (c - a);
                h.y = b + k * (d - b);
                return!0
                }, ih: function(a, b, c, d, f, g, h, k, l) {
        if (H.I(a, c) && H.I(b, d))
                return l.x = a, l.y = b, !1;
                if (H.nb(f, h)) {
        if (H.nb(a, c))
                return H.cn(a, b, c, d, f, g, l), !1;
                g = (d - b) / (c - a) * (f - a) + b;
                return H.cn(a, b, c, d, f, g, l)
                }
        k = (k - g) / (h - f);
                if (H.nb(a, c)) {
        g = k * (a - f) + g;
                b < d ? (h = b, c = d) : (h = d, c = b);
                if (g < h)
                return l.x = a, l.y = h, !1;
                if (g > c)
                return l.x = a, l.y = c, !1;
                l.x = a;
                l.y = g;
                return!0
                }
        h = (d - b) / (c - a);
                if (H.nb(k, h))
                return H.cn(a, b, c, d, f, g, l), !1;
                f = (h * a - k * f + g - b) / (h - k);
                if (H.nb(h, 0)) {
        a < c ? h = a : (h = c, c = a);
                if (f < h)
                return l.x = h, l.y = b, !1;
                if (f > c)
                return l.x = c, l.y = b, !1;
                l.x = f;
                l.y = b;
                return!0
                }
        g = h * (f - a) + b;
                return H.cn(a, b, c, d, f, g, l)
                }, AK: function(a, b, c, d, f) {
        return H.ih(c.x, c.y, d.x, d.y, a.x, a.y, b.x, b.y, f)
                }, wK: function(a, b, c, d, f, g, h, k, l, m) {
        function n(c, d) {
        var f = (c - a) * (c - a) + (d - b) * (d - b);
                f < p && (p = f, l.x = c, l.y = d)
                }
        var p = Infinity;
                n(l.x, l.y);
                var q, r, s, u;
                f < h ? (q = f, r = h) : (q = h, r = f);
                g < k ? (s = f, u = h) : (s = h, u =
                f);
                q = (r - q) / 2 + m;
                m = (u - s) / 2 + m;
                f = (f + h) / 2;
                g = (g + k) / 2;
                if (0 === q || 0 === m)
                return l;
                if (0.5 > (c > a ? c - a : a - c)) {
        q = 1 - (c - f) * (c - f) / (q * q);
                if (0 > q)
                return l;
                q = Math.sqrt(q);
                d = - m * q + g;
                n(c, m * q + g);
                n(c, d)
                } else {
        c = (d - b) / (c - a);
                d = 1 / (q * q) + c * c / (m * m);
                k = 2 * c * (b - c * a) / (m * m) - 2 * c * g / (m * m) - 2 * f / (q * q);
                q = k * k - 4 * d * (2 * c * a * g / (m * m) - 2 * b * g / (m * m) + g * g / (m * m) + f * f / (q * q) - 1 + (b - c * a) * (b - c * a) / (m * m));
                if (0 > q)
                return l;
                q = Math.sqrt(q);
                m = ( - k + q) / (2 * d);
                n(m, c * m - c * a + b);
                q = ( - k - q) / (2 * d);
                n(q, c * q - c * a + b)
                }
        return l
                }, kl: function(a, b, c, d, f, g, h, k, l) {
        var m = 1E21, n = a, p = b;
                if (H.ih(a, b, a,
                        d, f, g, h, k, l)) {
        var q = (l.x - f) * (l.x - f) + (l.y - g) * (l.y - g);
                q < m && (m = q, n = l.x, p = l.y)
                }
        H.ih(c, b, c, d, f, g, h, k, l) && (q = (l.x - f) * (l.x - f) + (l.y - g) * (l.y - g), q < m && (m = q, n = l.x, p = l.y));
                H.ih(a, b, c, b, f, g, h, k, l) && (q = (l.x - f) * (l.x - f) + (l.y - g) * (l.y - g), q < m && (m = q, n = l.x, p = l.y));
                H.ih(a, d, c, d, f, g, h, k, l) && (q = (l.x - f) * (l.x - f) + (l.y - g) * (l.y - g), q < m && (m = q, n = l.x, p = l.y));
                l.x = n;
                l.y = p;
                return 1E21 > m
                }, Kw: function(a, b, c) {
        var d = b.x, f = b.y, g = c.x, h = c.y, k = a.left, l = a.right, m = a.top, n = a.bottom;
                return d === g ? (f < h ? (a = f, g = h) : (a = h, g = f), k <= d && d <= l && a <= n && g >= m) :
                f === h ? (d < g ? a = d : (a = g, g = d), m <= f && f <= n && a <= l && g >= k) : a.Ga(b) || a.Ga(c) || H.Jw(k, m, l, m, d, f, g, h) || H.Jw(l, m, l, n, d, f, g, h) || H.Jw(l, n, k, n, d, f, g, h) || H.Jw(k, n, k, m, d, f, g, h) ? !0 : !1
                }, Jw: function(a, b, c, d, f, g, h, k) {
        return 0 >= H.jw(a, b, c, d, f, g) * H.jw(a, b, c, d, h, k) && 0 >= H.jw(f, g, h, k, a, b) * H.jw(f, g, h, k, c, d)
                }, jw: function(a, b, c, d, f, g) {
        c -= a;
                d -= b;
                a = f - a;
                b = g - b;
                g = a * d - b * c;
                0 === g && (g = a * c + b * d, 0 < g && (g = (a - c) * c + (b - d) * d, 0 > g && (g = 0)));
                return 0 > g ? - 1 : 0 < g ? 1 : 0
                }, Ct: function(a) {
        0 > a && (a += 360);
                360 <= a && (a -= 360);
                return a
                }, gE: function(a, b, c, d, f, g) {
        var h =
                Math.PI;
                g || (d *= h / 180, f *= h / 180);
                g = d < f ? 1 : - 1;
                var k = [], l = h / 2, m = d;
                for (d = Math.min(2 * h + 1E-5, Math.abs(f - d)); 1E-5 < d; )
                f = m + g * Math.min(d, l), k.push(H.hI(c, m, f, a, b)), d -= Math.abs(f - m), m = f;
                return k
                }, hI: function(a, b, c, d, f) {
        var g = (c - b) / 2, h = a * Math.cos(g), k = a * Math.sin(g), l = 0.5522847498 * Math.tan(g), m = h + l * k, h = - k + l * h, k = - h, l = g + b, g = Math.cos(l), l = Math.sin(l);
                return{x1: d + a * Math.cos(b), y1: f + a * Math.sin(b), x2: d + m * g - h * l, y2: f + m * l + h * g, ee: d + m * g - k * l, fe: f + m * l + k * g, Tb: d + a * Math.cos(c), Ub: f + a * Math.sin(c)}
        }, ct: function(a, b, c, d, f, g, h) {
        c =
                Math.floor((a - c) / f) * f + c;
                d = Math.floor((b - d) / g) * g + d;
                var k = c;
                c + f - a < f / 2 && (k = c + f);
                a = d;
                d + g - b < g / 2 && (a = d + g);
                h.p(k, a);
                return h
                }, GE: function(a, b) {
        var c = Math.max(a, b), d = Math.min(a, b), f = 1, g = 1;
                do
                f = c % d, c = g = d, d = f;
                while (0 < f);
                return g
                }, wI: function(a, b, c, d) {
        var f = 0 > c, g = 0 > d, h, k;
                a < b ? (h = 1, k = 0) : (h = 0, k = 1);
                var l, m;
                l = 0 === h ? a : b;
                m = 0 === h ? c : d;
                if (0 === h ? f : g)
                m = - m;
                h = k;
                c = 0 === h ? c : d;
                if (0 === h ? f : g)
                c = - c;
                return H.xI(l, 0 === h ? a : b, m, c, 0, 0)
                }, xI: function(a, b, c, d, f, g) {
        if (0 < d)
                if (0 < c) {
        g = a * a;
                f = b * b;
                a *= c;
                var h = b * d, k = - f + h, l = - f + Math.sqrt(a * a + h * h);
                b = k;
                for (var m = 0; 9999999999 > m; ++m) {
        b = 0.5 * (k + l);
                if (b === k || b === l)
                break;
                var n = a / (b + g), p = h / (b + f), n = n * n + p * p - 1;
                if (0 < n)
                k = b;
                else if (0 > n)
                l = b;
                else
                break
                }
        c = g * c / (b + g) - c;
                d = f * d / (b + f) - d;
                c = Math.sqrt(c * c + d * d)
                } else
                c = Math.abs(d - b);
                else
                d = a * a - b * b, f = a * c, f < d ? (d = f / d, f = a * d, g = b * Math.sqrt(Math.abs(1 - d * d)), c = f - c, c = Math.sqrt(c * c + g * g)) : c = Math.abs(c - a);
                return c
        }};
        function zc(a) {
        1 < arguments.length && t.m("Geometry constructor can take at most one optional argument, the Geometry type.");
                t.Ac(this);
                void 0 === a ? a = Ac : e && t.Aa(a, zc, zc, "constructor:type");
                this.da = a;
                this.ub = this.kb = this.xc = this.oc = 0;
                this.Bk = new B(Bc);
                this.Fu = this.Bk.V;
                this.qu = (new x).freeze();
                this.Va = !0;
                this.Li = Eb;
                this.Mi = Pb;
                this.$n = this.ao = NaN;
                this.wc = Cc
        }
t.ga("Geometry", zc);
        t.Xh(zc);
        zc.prototype.copy = function() {
        var a = new zc;
                a.da = this.da;
                a.oc = this.oc;
                a.xc = this.xc;
                a.kb = this.kb;
                a.ub = this.ub;
                for (var b = this.Bk, c = b.length, d = a.Bk, f = 0; f < c; f++) {
        var g = b.n[f].copy();
                d.add(g)
                }
        a.Fu = this.Fu;
                a.qu.assign(this.qu);
                a.Va = this.Va;
                a.Li = this.Li.Z();
                a.Mi = this.Mi.Z();
                a.ao = this.ao;
                a.$n = this.$n;
                a.wc = this.wc;
                return a
                };
        var Dc;
        zc.Line = Dc = t.w(zc, "Line", 0);
        var Ec;
        zc.Rectangle = Ec = t.w(zc, "Rectangle", 1);
        var Mc;
        zc.Ellipse = Mc = t.w(zc, "Ellipse", 2);
        var Ac;
        zc.Path = Ac = t.w(zc, "Path", 3);
        zc.prototype.Ja = function() {
        this.freeze();
                Object.freeze(this);
                return this
                };
        zc.prototype.freeze = function() {
        this.ob = !0;
                var a = this.Ab;
                a.freeze();
                for (var b = a.length, c = 0; c < b; c++)
                a.n[c].freeze();
                return this
                };
        zc.prototype.La = function() {
        Object.isFrozen(this) && t.m("cannot thaw constant: " + this);
                this.ob = !1;
                var a = this.Ab;
                a.La();
                for (var b = a.length, c = 0; c < b; c++)
                a.n[c].La();
                return this
                };
        zc.prototype.equalsApprox = zc.prototype.sf = function(a) {
        if (!(a instanceof zc))
                return!1;
                if (this.type !== a.type)
                return this.type === Dc && a.type === Ac ? Nc(this, a) : a.type === Dc && this.type === Ac ? Nc(a, this) : !1;
                if (this.type === Ac) {
        var b = this.Ab;
                a = a.Ab;
                var c = b.length;
                if (c !== a.length)
                return!1;
                for (var d = 0; d < c; d++)
                if (!b.n[d].sf(a.n[d]))
                return!1;
                return!0
                }
        return H.I(this.qa, a.qa) && H.I(this.ra, a.ra) && H.I(this.D, a.D) && H.I(this.F, a.F)
                };
        function Nc(a, b) {
        if (a.type !== Dc || b.type !== Ac)
                return!1;
                if (1 === b.Ab.count) {
        var c = b.Ab.wa(0);
                if (1 === c.Fa.count && H.I(a.qa, c.qa) && H.I(a.ra, c.ra) && (c = c.Fa.wa(0), c.type === Oc && H.I(a.D, c.D) && H.I(a.F, c.F)))
                return!0
        }
        return!1
        }
var Pc;
        zc.stringify = Pc = function(a) {
        return a.toString()
                };
        zc.prototype.toString = function(a) {
        switch (this.type) {
        case Dc:
                return void 0 === a ? "M" + this.qa.toString() + " " + this.ra.toString() + "L" + this.D.toString() + " " + this.F.toString() : "M" + this.qa.toFixed(a) + " " + this.ra.toFixed(a) + "L" + this.D.toFixed(a) + " " + this.F.toFixed(a);
                case Ec:
                var b = new x(this.qa, this.ra, 0, 0);
                b.LG(this.D, this.F, 0, 0);
                return void 0 === a ? "M" + b.x.toString() + " " + b.y.toString() + "H" + b.right.toString() + "V" + b.bottom.toString() + "H" + b.left.toString() + "z" : "M" + b.x.toFixed(a) + " " + b.y.toFixed(a) + "H" + b.right.toFixed(a) +
                "V" + b.bottom.toFixed(a) + "H" + b.left.toFixed(a) + "z";
                case Mc:
                b = new x(this.qa, this.ra, 0, 0);
                b.LG(this.D, this.F, 0, 0);
                if (void 0 === a) {
        var c = b.left.toString() + " " + (b.y + b.height / 2).toString(), d = b.right.toString() + " " + (b.y + b.height / 2).toString();
                return"M" + c + "A" + (b.width / 2).toString() + " " + (b.height / 2).toString() + " 0 0 1 " + d + "A" + (b.width / 2).toString() + " " + (b.height / 2).toString() + " 0 0 1 " + c
                }
        c = b.left.toFixed(a) + " " + (b.y + b.height / 2).toFixed(a);
                d = b.right.toFixed(a) + " " + (b.y + b.height / 2).toFixed(a);
                return"M" + c + "A" +
                (b.width / 2).toFixed(a) + " " + (b.height / 2).toFixed(a) + " 0 0 1 " + d + "A" + (b.width / 2).toFixed(a) + " " + (b.height / 2).toFixed(a) + " 0 0 1 " + c;
                case Ac:
                for (var b = "", c = this.Ab, d = c.length, f = 0; f < d; f++) {
        var g = c.n[f];
                0 < f && (b += " x ");
                g.op && (b += "F ");
                b += g.toString(a)
                }
        return b;
                default:
                return this.type.toString()
                }
        };
        var Qc;
        zc.fillPath = Qc = function(a) {
        "string" !== typeof a && t.bc(a, "string", zc, "fillPath:str");
                a = a.split(/[Xx]/);
                for (var b = a.length, c = "", d = 0; d < b; d++)
                var f = a[d], c = null !== f.match(/[Ff]/) ? 0 === d ? c + f : c + ("X" + (" " === f[0] ? "" : " ") + f) : c + ((0 === d ? "" : "X ") + "F" + (" " === f[0] ? "" : " ") + f);
                return c
                };
        var Rc;
        zc.parse = Rc = function(a, b) {
        function c() {
        return n >= v - 1 ? !0 : null !== m[n + 1].match(/[A-Za-z]/)
                }
        function d() {
        n++;
                return m[n]
                }
        function f() {
        var a = new w(parseFloat(d()), parseFloat(d()));
                p === p.toLowerCase() && (a.x = u.x + a.x, a.y = u.y + a.y);
                return a
                }
        function g() {
        return u = f()
                }
        function h() {
        return s = f()
                }
        function k() {
        var a = [parseFloat(d()), parseFloat(d()), parseFloat(d()), parseFloat(d()), parseFloat(d())];
                c() || (a.push(parseFloat(d())), c() || a.push(parseFloat(d())));
                p === p.toLowerCase() && (a[2] += u.x, a[3] += u.y);
                return a
                }
        function l() {
        return"c" !==
                q.toLowerCase() && "s" !== q.toLowerCase() ? u : new w(2 * u.x - s.x, 2 * u.y - s.y)
                }
        void 0 === b && (b = !1);
                "string" !== typeof a && t.bc(a, "string", zc, "parse:str");
                a = a.replace(/,/gm, " ");
                a = a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm, "$1 $2");
                a = a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm, "$1 $2");
                a = a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFf])([^\s])/gm, "$1 $2");
                a = a.replace(/([^\s])([UuBbMmZzLlHhVvCcSsQqTtAaFf])/gm, "$1 $2");
                a = a.replace(/([0-9])([+\-])/gm, "$1 $2");
                a = a.replace(/(\.[0-9]*)(\.)/gm, "$1 $2");
                a = a.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm, "$1 $3 $4 ");
                a = a.replace(/[\s\r\t\n]+/gm, " ");
                a = a.replace(/^\s+|\s+$/g, "");
                for (var m = a.split(" "), n = - 1, p = "", q = "", r = new w(0, 0), s = new w(0, 0), u = new w(0, 0), v = m.length, D = t.u(), A, G = !1, L = !1, N = !0; !(n >= v - 1); )
                if (q = p, p = d(), "" !== p)
                switch (p.toUpperCase()) {
        case "X":
                N = !0;
                L = G = !1;
                break;
                case "M":
                A = g();
                null === D.Vb || !0 === N ? (J(D, A.x, A.y, G, !1, !L), N = !1) : D.moveTo(A.x, A.y);
                for (r = u; !c(); )
                A = g(), D.lineTo(A.x, A.y);
                break;
                case "L":
                for (; !c(); )
                A =
                g(), D.lineTo(A.x, A.y);
                break;
                case "H":
                for (; !c(); )
                u = A = new w((p === p.toLowerCase() ? u.x : 0) + parseFloat(d()), u.y), D.lineTo(u.x, u.y);
                break;
                case "V":
                for (; !c(); )
                u = A = new w(u.x, (p === p.toLowerCase() ? u.y : 0) + parseFloat(d())), D.lineTo(u.x, u.y);
                break;
                case "C":
                for (; !c(); ) {
        var O = f(), U = h();
                A = g();
                K(D, O.x, O.y, U.x, U.y, A.x, A.y)
                }
        break;
                case "S":
                for (; !c(); )
                O = l(), U = h(), A = g(), K(D, O.x, O.y, U.x, U.y, A.x, A.y);
                break;
                case "Q":
                for (; !c(); )
                U = h(), A = g(), Sc(D, U.x, U.y, A.x, A.y);
                break;
                case "T":
                for (; !c(); )
                s = U = l(), A = g(), Sc(D, U.x, U.y, A.x, A.y);
                break;
                case "B":
                for (; !c(); )
                A = k(), D.arcTo(A[0], A[1], A[2], A[3], A[4], A[5], A[6]);
                break;
                case "A":
                for (; !c(); ) {
        var O = Math.abs(parseFloat(d())), U = Math.abs(parseFloat(d())), Y = parseFloat(d()), ba = !!parseFloat(d()), R = !!parseFloat(d());
                A = g();
                Tc(D, O, U, Y, ba, R, A.x, A.y)
                }
        break;
                case "Z":
                M(D);
                u = r;
                break;
                case "F":
                A = null;
                for (O = 1; m[n + O]; )
                if (null !== m[n + O].match(/[Uu]/))
                O++;
                else if (null === m[n + O].match(/[A-Za-z]/))
                O++;
                else {
                A = m[n + O];
                        break
                        }
        A.match(/[Mm]/) ? G = !0 : Zc(D);
                break;
                case "U":
                A = null;
                for (O = 1; m[n + O]; )
                if (null !== m[n + O].match(/[Ff]/))
                O++;
                else if (null === m[n + O].match(/[A-Za-z]/))
                O++;
                else {
                A = m[n + O];
                        break
                        }
        A.match(/[Mm]/) ? L = !0 : D.bb(!1)
                }
        r = D.s;
                t.v(D);
                if (b)
                for (D = r.Ab.k; D.next(); )
                D.value.op = !0;
                return r
                };
        function $c(a, b) {
        for (var c = a.length, d = t.K(), f = 0; f < c; f++) {
        var g = a[f];
                d.x = g.x1;
                d.y = g.y1;
                b.Ta(d);
                g.x1 = d.x;
                g.y1 = d.y;
                d.x = g.x2;
                d.y = g.y2;
                b.Ta(d);
                g.x2 = d.x;
                g.y2 = d.y;
                d.x = g.ee;
                d.y = g.fe;
                b.Ta(d);
                g.ee = d.x;
                g.fe = d.y;
                d.x = g.Tb;
                d.y = g.Ub;
                b.Ta(d);
                g.Tb = d.x;
                g.Ub = d.y
        }
        t.B(d)
        }
zc.prototype.vA = function() {
if (this.Va)
        return!0;
        var a = this.Ab;
        if (this.Fu !== a.V)
        return!0;
        for (var b = a.length, c = 0; c < b; c++)
        if (a.n[c].vA())
        return!0;
        return!1
        };
        zc.prototype.pB = function() {
        this.Va = !1;
                var a = this.Ab;
                this.Fu = a.V;
                for (var b = a.length, c = 0; c < b; c++)
                a.n[c].pB()
                };
        zc.prototype.pf = function() {
        var a = this.qu;
                a.La();
                isNaN(this.ao) || isNaN(this.$n) ? a.p(0, 0, 0, 0) : a.p(0, 0, this.ao, this.$n);
                ad(this, a, !1);
                hb(a, 0, 0, 0, 0);
                a.freeze()
                };
        zc.prototype.computeBoundsWithoutOrigin = zc.prototype.dI = function() {
        var a = new x;
                ad(this, a, !0);
                return a
                };
        function ad(a, b, c) {
        switch (a.type) {
        case Dc:
                case Ec:
                case Mc:
                c ? b.p(a.oc, a.xc, 0, 0) : hb(b, a.oc, a.xc, 0, 0);
                hb(b, a.kb, a.ub, 0, 0);
                break;
                case Ac:
                a = a.Ab;
                for (var d = a.length, f = 0; f < d; f++) {
        var g = a.n[f];
                c && 0 === f ? b.p(g.qa, g.ra, 0, 0) : hb(b, g.qa, g.ra, 0, 0);
                for (var h = g.Fa, k = h.length, l = g.qa, m = g.ra, n = 0; n < k; n++) {
        var p = h.n[n];
                switch (p.type) {
        case Oc:
                case bd:
                l = p.D;
                m = p.F;
                hb(b, l, m, 0, 0);
                break;
                case cd:
                H.So(l, m, p.Bb, p.Rb, p.se, p.te, p.D, p.F, 0.5, b);
                l = p.D;
                m = p.F;
                break;
                case dd:
                H.OA(l, m, p.Bb, p.Rb, p.D, p.F, 0.5, b);
                l = p.D;
                m = p.F;
                break;
                case ed:
                case fd:
                for (var p =
                        p.type === ed ? gd(p, g) : hd(p, g, l, m), q = p.length, r = null, s = 0; s < q; s++)
                r = p[s], H.So(r.x1, r.y1, r.x2, r.y2, r.ee, r.fe, r.Tb, r.Ub, 0.5, b);
                null !== r && (l = r.Tb, m = r.Ub);
                break;
                default:
                t.m("Unknown Segment type: " + p.type)
        }
        }
        }
        break;
                default:
                t.m("Unknown Geometry type: " + a.type)
        }
        }
zc.prototype.normalize = zc.prototype.normalize = function() {
t.L(this);
        var a = this.dI();
        this.offset( - a.x, - a.y);
        return new w( - a.x, - a.y)
        };
        zc.prototype.offset = zc.prototype.offset = function(a, b) {
        t.L(this);
                e && (t.q(a, zc, "offset"), t.q(b, zc, "offset"));
                this.transform(1, 0, 0, 1, a, b)
                };
        zc.prototype.scale = zc.prototype.scale = function(a, b) {
        t.L(this);
                e && (t.q(a, zc, "scale:x"), t.q(b, zc, "scale:y"), 0 >= a && t.la(a, "scale must be greater than zero", zc, "scale:x"), 0 >= b && t.la(b, "scale must be greater than zero", zc, "scale:y"));
                this.transform(a, 0, 0, b, 0, 0)
                };
        zc.prototype.rotate = zc.prototype.rotate = function(a, b, c) {
        t.L(this);
                void 0 === b && (b = 0);
                void 0 === c && (c = 0);
                e && (t.q(a, zc, "rotate:angle"), t.q(b, zc, "rotate:x"), t.q(c, zc, "rotate:y"));
                var d = t.oh();
                d.reset();
                d.rotate(a, b, c);
                this.transform(d.m11, d.m12, d.m21, d.m22, d.dx, d.dy);
                t.We(d)
                };
        zc.prototype.transform = zc.prototype.transform = function(a, b, c, d, f, g) {
        var h, k;
                switch (this.type) {
        case Dc:
                case Ec:
                case Mc:
                h = this.oc;
                k = this.xc;
                this.oc = h * a + k * c + f;
                this.xc = h * b + k * d + g;
                h = this.kb;
                k = this.ub;
                this.kb = h * a + k * c + f;
                this.ub = h * b + k * d + g;
                break;
                case Ac:
                for (var l = this.Ab, m = l.length, n = 0; n < m; n++) {
        var p = l.n[n];
                h = p.qa;
                k = p.ra;
                p.qa = h * a + k * c + f;
                p.ra = h * b + k * d + g;
                for (var p = p.Fa, q = p.length, r = 0; r < q; r++) {
        var s = p.n[r];
                switch (s.type) {
        case Oc:
                case bd:
                h = s.D;
                k = s.F;
                s.D = h * a + k * c + f;
                s.F = h * b + k * d + g;
                break;
                case cd:
                h = s.Bb;
                k = s.Rb;
                s.Bb = h *
                a + k * c + f;
                s.Rb = h * b + k * d + g;
                h = s.se;
                k = s.te;
                s.se = h * a + k * c + f;
                s.te = h * b + k * d + g;
                h = s.D;
                k = s.F;
                s.D = h * a + k * c + f;
                s.F = h * b + k * d + g;
                break;
                case dd:
                h = s.Bb;
                k = s.Rb;
                s.Bb = h * a + k * c + f;
                s.Rb = h * b + k * d + g;
                h = s.D;
                k = s.F;
                s.D = h * a + k * c + f;
                s.F = h * b + k * d + g;
                break;
                case ed:
                h = s.Da;
                k = s.Pa;
                s.Da = h * a + k * c + f;
                s.Pa = h * b + k * d + g;
                s.radiusX *= Math.sqrt(a * a + c * c);
                void 0 !== s.radiusY && (s.radiusY *= Math.sqrt(b * b + d * d));
                break;
                case fd:
                h = s.D;
                k = s.F;
                s.D = h * a + k * c + f;
                s.F = h * b + k * d + g;
                s.radiusX *= Math.sqrt(a * a + c * c);
                s.radiusY *= Math.sqrt(b * b + d * d);
                break;
                default:
                t.m("Unknown Segment type: " +
                        s.type)
                }
        }
        }
        }
        this.Va = !0
                };
        zc.prototype.Ds = function(a, b) {
        var c = this.oc, d = this.xc, f = this.kb, g = this.ub, h = Math.min(c, f), k = Math.min(d, g), c = Math.abs(f - c), d = Math.abs(g - d), g = t.K();
                g.x = h;
                g.y = k;
                b.Ta(g);
                f = new Bc(g.x, g.y);
                g.x = h + c;
                g.y = k;
                b.Ta(g);
                f.Fa.add(new id(Oc, g.x, g.y));
                g.x = h + c;
                g.y = k + d;
                b.Ta(g);
                f.Fa.add(new id(Oc, g.x, g.y));
                g.x = h;
                g.y = k + d;
                b.Ta(g);
                f.Fa.add((new id(Oc, g.x, g.y)).close());
                t.B(g);
                a.type = Ac;
                a.Ab.add(f);
                return a
                };
        zc.prototype.Ga = function(a, b, c, d) {
        var f = a.x, g = a.y, h = this.Ob.x - 20;
                a = a.y;
                for (var k = 0, l, m, n, p, q, r, s, u = this.Ab.n, v = u.length, D = 0; D < v; D++) {
        var A = u[D];
                if (A.op) {
        if (c && A.Ga(f, g, b))
                return!0;
                var G = A.Fa;
                l = A.qa;
                m = A.ra;
                for (var L = l, N = m, O = 0; O <= G.length; O++) {
        O !== G.length ? (n = G.n[O], p = n.type, r = n.D, s = n.F) : (p = Oc, r = L, s = N);
                switch (p) {
        case bd:
                q = jd(f, g, h, a, l, m, L, N);
                if (!0 === q)
                return!0;
                k += q;
                L = r;
                N = s;
                break;
                case Oc:
                q = jd(f, g, h, a, l, m, r, s);
                if (!0 === q)
                return!0;
                k += q;
                break;
                case cd:
                q = H.Qs(l, m, n.Bb, n.Rb, n.se, n.te, r, s, h, a, f, g, 0.5);
                k += q;
                break;
                case dd:
                q = H.Qs(l, m, (l + 2 * n.Bb) / 3, (m + 2 * n.Rb) / 3, (n.Bb + 2 * r) / 3, (n.Bb + 2 * r) / 3, r, s, h, a, f, g, 0.5);
                k += q;
                break;
                case ed:
                case fd:
                p = n.type === ed ? gd(n, A) : hd(n, A, l, m);
                for (var U = p.length, Y = null, ba = 0; ba < U; ba++) {
        Y = p[ba];
                if (0 === ba) {
        q = jd(f, g, h, a, l, m, Y.x1, Y.y1);
                if (!0 === q)
                return!0;
                k += q
                }
        q = H.Qs(Y.x1, Y.y1, Y.x2, Y.y2, Y.ee, Y.fe, Y.Tb, Y.Ub, h, a, f, g, 0.5);
                k += q
                }
        null !== Y && (r = Y.Tb, s = Y.Ub);
                break;
                default:
                t.m("Unknown Segment type: " + n.type)
                }
        l = r;
                m = s
                }
        if (0 !== k)
                return!0;
                k = 0
                } else if (A.Ga(f, g, d ? b : b + 2))
                return!0
                }
        return 0 !== k
                };
        function jd(a, b, c, d, f, g, h, k) {
        if (H.Kd(f, g, h, k, 0.05, a, b))
                return!0;
                var l = (a - c) * (g - k);
                if (0 === l)
                return 0;
                var m = ((a * d - b * c) * (f - h) - (a - c) * (f * k - g * h)) / l;
                b = (a * d - b * c) * (g - k) / l;
                if (m >= a)
                return 0;
                if ((f > h ? f - h : h - f) < (g > k ? g - k : k - g)) {
        if (g < k ? (a = g, f = k) : (a = k, f = g), b < a || b > f)
                return 0
        } else if (f < h ? (a = f, f = h) : a = h, m < a || m > f)
                return 0;
                return 0 < l ? 1 : - 1
        }
function kd(a, b, c, d) {
for (var f = a.Ab.length, g = 0; g < f; g++)
        if (a.Ab.n[g].Ga(b, c, d))
        return!0;
        return!1
        }
zc.prototype.getPointAlongPath = function(a) {
(0 > a || 1 < a) && t.la(a, "0 <= fraction <= 1", zc, "getPointAlongPath:fraction");
        var b = this.Ab.$a(), c = t.Cb(), d = [];
        d.push([b.qa, b.ra]);
        for (var f = b.qa, g = b.ra, h = f, k = g, l = b.Fa.n, m = l.length, n = 0; n < m; n++) {
var p = l[n];
        switch (p.da) {
case bd:
        c.push(d);
        d = [];
        d.push([p.D, p.F]);
        f = p.D;
        g = p.F;
        h = f;
        k = g;
        break;
        case Oc:
        d.push([p.D, p.F]);
        f = p.D;
        g = p.F;
        break;
        case cd:
        H.ze(f, g, p.hd, p.ye, p.kg, p.lg, p.kb, p.ub, 0.5, d);
        f = p.D;
        g = p.F;
        break;
        case dd:
        H.Ip(f, g, p.hd, p.ye, p.kb, p.ub, 0.5, d);
        f = p.D;
        g = p.F;
        break;
        case ed:
        for (var q = gd(p, b), r = q.length, s = 0; s < r; s++) {
var u = q[s];
        H.ze(f, g, u.x2, u.y2, u.ee, u.fe, u.Tb, u.Ub, 0.5, d);
        f = u.Tb;
        g = u.Ub
        }
break;
        case fd:
        q = hd(p, b, f, g);
        r = q.length;
        for (s = 0; s < r; s++)
        u = q[s], H.ze(f, g, u.x2, u.y2, u.ee, u.fe, u.Tb, u.Ub, 0.5, d), f = u.Tb, g = u.Ub;
        break;
        default:
        t.m("Segment not of valid type")
        }
p.Gh && d.push([h, k])
        }
c.push(d);
        m = 0;
        f = c.length;
        b = null;
        for (g = 0; g < f; g++)
        for (h = c[g], k = h.length, n = 0; n < k; n++)
        d = h[n], 0 !== n && (l = Math.sqrt(Sa(b[0], b[1], d[0], d[1])), m += l), b = d;
        a *= m;
        for (g = m = 0; g < f; g++)
        for (h = c[g], k = h.length, n =
                0; n < k; n++) {
d = h[n];
        if (0 !== n) {
l = Math.sqrt(Sa(b[0], b[1], d[0], d[1]));
        if (m + l > a)
        return n = (a - m) / l, t.ya(c), new w(b[0] + (d[0] - b[0]) * n, b[1] + (d[1] - b[1]) * n);
        m += l
        }
b = d
        }
t.ya(c);
        return null
        };
        t.g(zc, "type", zc.prototype.type);
        t.defineProperty(zc, {type: "type"}, function() {
        return this.da
                }, function(a) {
        this.da !== a && (e && t.Aa(a, zc, zc, "type"), t.L(this, a), this.da = a, this.Va = !0)
                });
        t.g(zc, "startX", zc.prototype.qa);
        t.defineProperty(zc, {qa: "startX"}, function() {
        return this.oc
                }, function(a) {
        this.oc !== a && (e && t.q(a, zc, "startX"), t.L(this, a), this.oc = a, this.Va = !0)
                });
        t.g(zc, "startY", zc.prototype.ra);
        t.defineProperty(zc, {ra: "startY"}, function() {
        return this.xc
                }, function(a) {
        this.xc !== a && (e && t.q(a, zc, "startY"), t.L(this, a), this.xc = a, this.Va = !0)
                });
        t.g(zc, "endX", zc.prototype.D);
        t.defineProperty(zc, {D: "endX"}, function() {
        return this.kb
                }, function(a) {
        this.kb !== a && (e && t.q(a, zc, "endX"), t.L(this, a), this.kb = a, this.Va = !0)
                });
        t.g(zc, "endY", zc.prototype.F);
        t.defineProperty(zc, {F: "endY"}, function() {
        return this.ub
                }, function(a) {
        this.ub !== a && (e && t.q(a, zc, "endY"), t.L(this, a), this.ub = a, this.Va = !0)
                });
        t.g(zc, "figures", zc.prototype.Ab);
        t.defineProperty(zc, {Ab: "figures"}, function() {
        return this.Bk
                }, function(a) {
        this.Bk !== a && (e && t.l(a, B, zc, "figures"), t.L(this, a), this.Bk = a, this.Va = !0)
                });
        t.defineProperty(zc, {G: "spot1"}, function() {
        return this.Li
                }, function(a) {
        e && t.l(a, I, zc, "spot1");
                t.L(this, a);
                this.Li = a.Z()
                });
        t.defineProperty(zc, {H: "spot2"}, function() {
        return this.Mi
                }, function(a) {
        e && t.l(a, I, zc, "spot2");
                t.L(this, a);
                this.Mi = a.Z()
                });
        t.A(zc, {Ob: "bounds"}, function() {
        this.vA() && (this.pB(), this.pf());
                return this.qu
                });
        function Bc(a, b, c) {
        t.Ac(this);
                void 0 === c && (c = !0);
                this.Tl = c;
                this.co = !0;
                void 0 !== a ? (e && t.q(a, Bc, "sx"), this.oc = a) : this.oc = 0;
                void 0 !== b ? (e && t.q(b, Bc, "sy"), this.xc = b) : this.xc = 0;
                this.gs = new B(id);
                this.Ev = this.gs.V;
                this.Va = !0
        }
t.ga("PathFigure", Bc);
        t.Xh(Bc);
        Bc.prototype.copy = function() {
        var a = new Bc;
                a.Tl = this.Tl;
                a.co = this.co;
                a.oc = this.oc;
                a.xc = this.xc;
                for (var b = this.gs, c = b.length, d = a.gs, f = 0; f < c; f++) {
        var g = b.n[f].copy();
                d.add(g)
                }
        a.Ev = this.Ev;
                a.Va = this.Va;
                return a
                };
        Bc.prototype.equalsApprox = Bc.prototype.sf = function(a) {
        if (!(a instanceof Bc && H.I(this.qa, a.qa) && H.I(this.ra, a.ra)))
                return!1;
                var b = this.Fa;
                a = a.Fa;
                var c = b.length;
                if (c !== a.length)
                return!1;
                for (var d = 0; d < c; d++)
                if (!b.n[d].sf(a.n[d]))
                return!1;
                return!0
                };
        aa = Bc.prototype;
        aa.toString = function(a) {
        for (var b = void 0 === a ? "M" + this.qa.toString() + " " + this.ra.toString() : "M" + this.qa.toFixed(a) + " " + this.ra.toFixed(a), c = this.Fa, d = c.length, f = 0; f < d; f++)
                b += " " + c.n[f].toString(a);
                return b
                };
        aa.freeze = function() {
        this.ob = !0;
                var a = this.Fa;
                a.freeze();
                for (var b = a.length, c = 0; c < b; c++)
                a.n[c].freeze();
                return this
                };
        aa.La = function() {
        this.ob = !1;
                var a = this.Fa;
                a.La();
                for (var b = a.length, c = 0; c < b; c++)
                a.n[c].La();
                return this
                };
        aa.vA = function() {
        if (this.Va)
                return!0;
                var a = this.Fa;
                if (this.Ev !== a.V)
                return!0;
                for (var b = a.length, c = 0; c < b; c++)
                if (a.n[c].Va)
                return!0;
                return!1
                };
        aa.pB = function() {
        this.Va = !1;
                var a = this.Fa;
                this.Ev = a.V;
                for (var b = a.length, c = 0; c < b; c++) {
        var d = a.n[c];
                d.Va = !1;
                d.nj = null
                }
        };
        t.g(Bc, "isFilled", Bc.prototype.op);
        t.defineProperty(Bc, {op: "isFilled"}, function() {
        return this.Tl
                }, function(a) {
        e && t.i(a, "boolean", Bc, "isFilled");
                t.L(this, a);
                this.Tl = a
                });
        t.g(Bc, "isShadowed", Bc.prototype.fj);
        t.defineProperty(Bc, {fj: "isShadowed"}, function() {
        return this.co
                }, function(a) {
        e && t.i(a, "boolean", Bc, "isShadowed");
                t.L(this, a);
                this.co = a
                });
        t.g(Bc, "startX", Bc.prototype.qa);
        t.defineProperty(Bc, {qa: "startX"}, function() {
        return this.oc
                }, function(a) {
        e && t.q(a, Bc, "startX");
                t.L(this, a);
                this.oc = a;
                this.Va = !0
                });
        t.g(Bc, "startY", Bc.prototype.ra);
        t.defineProperty(Bc, {ra: "startY"}, function() {
        return this.xc
                }, function(a) {
        e && t.q(a, Bc, "startY");
                t.L(this, a);
                this.xc = a;
                this.Va = !0
                });
        t.g(Bc, "segments", Bc.prototype.Fa);
        t.defineProperty(Bc, {Fa: "segments"}, function() {
        return this.gs
                }, function(a) {
        e && t.l(a, B, Bc, "segments");
                t.L(this, a);
                this.gs = a;
                this.Va = !0
                });
        Bc.prototype.Ga = function(a, b, c) {
        for (var d = this.qa, f = this.ra, g = d, h = f, k = this.Fa.n, l = k.length, m = 0; m < l; m++) {
        var n = k[m];
                switch (n.type) {
        case bd:
                g = n.D;
                h = n.F;
                d = n.D;
                f = n.F;
                break;
                case Oc:
                if (H.Kd(d, f, n.D, n.F, c, a, b))
                return!0;
                d = n.D;
                f = n.F;
                break;
                case cd:
                if (H.cw(d, f, n.Bb, n.Rb, n.se, n.te, n.D, n.F, 0.5, a, b, c))
                return!0;
                d = n.D;
                f = n.F;
                break;
                case dd:
                if (H.PA(d, f, n.Bb, n.Rb, n.D, n.F, 0.5, a, b, c))
                return!0;
                d = n.D;
                f = n.F;
                break;
                case ed:
                case fd:
                for (var p = n.type === ed ? gd(n, this) : hd(n, this, d, f), q = p.length, r = null, s = 0; s < q; s++)
                if (r = p[s], 0 === s &&
                        H.Kd(d, f, r.x1, r.y1, c, a, b) || H.cw(r.x1, r.y1, r.x2, r.y2, r.ee, r.fe, r.Tb, r.Ub, 0.5, a, b, c))
                return!0;
                null !== r && (d = r.Tb, f = r.Ub);
                break;
                default:
                t.m("Unknown Segment type: " + n.type)
                }
        if (n.nt && (d !== g || f !== h) && H.Kd(d, f, g, h, c, a, b))
                return!0
                }
        return!1
                };
        function id(a, b, c, d, f, g, h, k) {
        t.Ac(this);
                void 0 === a ? a = Oc : e && t.Aa(a, id, id, "constructor:type");
                this.da = a;
                void 0 !== b ? (e && t.q(b, id, "ex"), this.kb = b) : this.kb = 0;
                void 0 !== c ? (e && t.q(c, id, "ey"), this.ub = c) : this.ub = 0;
                a === fd ? (void 0 !== g && (a = g % 360, 0 > a && (a += 360), this.hd = a), void 0 !== d && (e && t.q(d, id, "x1"), this.kg = Math.max(d, 0)), void 0 !== f && (e && t.q(f, id, "y1"), this.lg = Math.max(f, 0)), this.lo = !!h, this.yn = !!k) : (void 0 !== d && (e && t.q(d, id, "x1"), this.hd = d), void 0 !== f && (e && t.q(f, id, "y1"), this.ye = f), void 0 !== g && (e && t.q(g, id,
                "x2"), a === ed && (g = Math.max(g, 0)), this.kg = g), void 0 !== h && "number" === typeof h && (e && t.q(h, id, "y2"), a === ed && (h = Math.max(h, 0)), this.lg = h));
                this.Gh = !1;
                this.Va = !0;
                this.nj = null
        }
t.ga("PathSegment", id);
        t.Xh(id);
        id.prototype.copy = function() {
        var a = new id;
                a.da = this.da;
                a.kb = this.kb;
                a.ub = this.ub;
                void 0 !== this.hd && (a.hd = this.hd);
                void 0 !== this.ye && (a.ye = this.ye);
                void 0 !== this.kg && (a.kg = this.kg);
                void 0 !== this.lg && (a.lg = this.lg);
                void 0 !== this.lo && (a.lo = this.lo);
                void 0 !== this.yn && (a.yn = this.yn);
                a.Gh = this.Gh;
                a.Va = this.Va;
                return a
                };
        id.prototype.equalsApprox = id.prototype.sf = function(a) {
        if (!(a instanceof id) || this.type !== a.type || this.nt !== a.nt)
                return!1;
                switch (this.type) {
        case bd:
                case Oc:
                return H.I(this.D, a.D) && H.I(this.F, a.F);
                case cd:
                return H.I(this.D, a.D) && H.I(this.F, a.F) && H.I(this.Bb, a.Bb) && H.I(this.Rb, a.Rb) && H.I(this.se, a.se) && H.I(this.te, a.te);
                case dd:
                return H.I(this.D, a.D) && H.I(this.F, a.F) && H.I(this.Bb, a.Bb) && H.I(this.Rb, a.Rb);
                case ed:
                return H.I(this.mh, a.mh) && H.I(this.hi, a.hi) && H.I(this.Da, a.Da) && H.I(this.Pa, a.Pa) && H.I(this.radiusX,
                a.radiusX) && H.I(this.radiusY, a.radiusY);
                case fd:
                return this.Mw === a.Mw && this.Ow === a.Ow && H.I(this.Bx, a.Bx) && H.I(this.D, a.D) && H.I(this.F, a.F) && H.I(this.radiusX, a.radiusX) && H.I(this.radiusY, a.radiusY);
                default:
                return!1
                }
        };
        id.prototype.toString = function(a) {
        switch (this.type) {
        case bd:
                a = void 0 === a ? "M" + this.D.toString() + " " + this.F.toString() : "M" + this.D.toFixed(a) + " " + this.F.toFixed(a);
                break;
                case Oc:
                a = void 0 === a ? "L" + this.D.toString() + " " + this.F.toString() : "L" + this.D.toFixed(a) + " " + this.F.toFixed(a);
                break;
                case cd:
                a = void 0 === a ? "C" + this.Bb.toString() + " " + this.Rb.toString() + " " + this.se.toString() + " " + this.te.toString() + " " + this.D.toString() + " " + this.F.toString() : "C" + this.Bb.toFixed(a) + " " + this.Rb.toFixed(a) + " " + this.se.toFixed(a) +
                " " + this.te.toFixed(a) + " " + this.D.toFixed(a) + " " + this.F.toFixed(a);
                break;
                case dd:
                a = void 0 === a ? "Q" + this.Bb.toString() + " " + this.Rb.toString() + " " + this.D.toString() + " " + this.F.toString() : "Q" + this.Bb.toFixed(a) + " " + this.Rb.toFixed(a) + " " + this.D.toFixed(a) + " " + this.F.toFixed(a);
                break;
                case ed:
                a = void 0 === a ? "B" + this.mh.toString() + " " + this.hi.toString() + " " + this.Da.toString() + " " + this.Pa.toString() + " " + this.radiusX : "B" + this.mh.toFixed(a) + " " + this.hi.toFixed(a) + " " + this.Da.toFixed(a) + " " + this.Pa.toFixed(a) +
                " " + this.radiusX;
                break;
                case fd:
                a = void 0 === a ? "A" + this.radiusX.toString() + " " + this.radiusY.toString() + " " + this.Bx.toString() + " " + (this.Ow ? 1 : 0) + " " + (this.Mw ? 1 : 0) + " " + this.D.toString() + " " + this.F.toString() : "A" + this.radiusX.toFixed(a) + " " + this.radiusY.toFixed(a) + " " + this.Bx.toFixed(a) + " " + (this.Ow ? 1 : 0) + " " + (this.Mw ? 1 : 0) + " " + this.D.toFixed(a) + " " + this.F.toFixed(a);
                break;
                default:
                a = this.type.toString()
                }
        return a + (this.Gh ? "z" : "")
                };
        var bd;
        id.Move = bd = t.w(id, "Move", 0);
        var Oc;
        id.Line = Oc = t.w(id, "Line", 1);
        var cd;
        id.Bezier = cd = t.w(id, "Bezier", 2);
        var dd;
        id.QuadraticBezier = dd = t.w(id, "QuadraticBezier", 3);
        var ed;
        id.Arc = ed = t.w(id, "Arc", 4);
        var fd;
        id.SvgArc = fd = t.w(id, "SvgArc", 4);
        id.prototype.freeze = function() {
        this.ob = !0;
                return this
                };
        id.prototype.La = function() {
        this.ob = !1;
                return this
                };
        id.prototype.close = id.prototype.close = function() {
        this.Gh = !0;
                return this
                };
        function gd(a, b) {
        if (null !== a.nj && !1 === b.Va)
                return a.nj;
                var c = a.radiusX, d = a.radiusY;
                void 0 === d && (d = c);
                var f = a.hd, g = a.ye, h = H.gE(0, 0, c < d ? c : d, a.mh, a.mh + a.hi);
                if (c !== d) {
        var k = t.oh();
                k.reset();
                c < d ? k.scale(1, d / c) : k.scale(c / d, 1);
                for (var c = h.length, d = t.K(), l = 0; l < c; l++) {
        var m = h[l];
                d.x = m.x1;
                d.y = m.y1;
                k.Ta(d);
                m.x1 = d.x;
                m.y1 = d.y;
                d.x = m.x2;
                d.y = m.y2;
                k.Ta(d);
                m.x2 = d.x;
                m.y2 = d.y;
                d.x = m.ee;
                d.y = m.fe;
                k.Ta(d);
                m.ee = d.x;
                m.fe = d.y;
                d.x = m.Tb;
                d.y = m.Ub;
                k.Ta(d);
                m.Tb = d.x;
                m.Ub = d.y
        }
        t.B(d);
                t.We(k)
        }
        k = h.length;
                for (c = 0; c < k; c++)
                d = h[c], d.x1 +=
                f, d.y1 += g, d.x2 += f, d.y2 += g, d.ee += f, d.fe += g, d.Tb += f, d.Ub += g;
                a.nj = h;
                return a.nj
        }
function hd(a, b, c, d) {
function f(a, b) {
return(a[0] * b[1] < a[1] * b[0] ? - 1 : 1) * Math.acos(g(a, b))
        }
function g(a, b) {
return(a[0] * b[0] + a[1] * b[1]) / (Math.sqrt(Math.pow(a[0], 2) + Math.pow(a[1], 2)) * Math.sqrt(Math.pow(b[0], 2) + Math.pow(b[1], 2)))
        }
if (null !== a.nj && !1 === b.Va)
        return a.nj;
        b = a.kg;
        var h = a.lg, k = Math.PI / 180 * a.hd, l = a.lo, m = a.yn, n = a.kb, p = a.ub, q = Math.cos(k) * (c - n) / 2 + Math.sin(k) * (d - p) / 2, r = - Math.sin(k) * (c - n) / 2 + Math.cos(k) * (d - p) / 2, s = Math.pow(q, 2) / Math.pow(b, 2) + Math.pow(r, 2) / Math.pow(h, 2);
        1 < s && (b *= Math.sqrt(s), h *= Math.sqrt(s));
        s = (l === m ? - 1 : 1) * Math.sqrt((Math.pow(b, 2) * Math.pow(h, 2) - Math.pow(b, 2) * Math.pow(r, 2) - Math.pow(h, 2) * Math.pow(q, 2)) / (Math.pow(b, 2) * Math.pow(r, 2) + Math.pow(h, 2) * Math.pow(q, 2)));
        isNaN(s) && (s = 0);
        l = s * b * r / h;
        s = s * - h * q / b;
        isNaN(l) && (l = 0);
        isNaN(s) && (s = 0);
        c = (c + n) / 2 + Math.cos(k) * l - Math.sin(k) * s;
        d = (d + p) / 2 + Math.sin(k) * l + Math.cos(k) * s;
        k = f([1, 0], [(q - l) / b, (r - s) / h]);
        p = [(q - l) / b, (r - s) / h];
        r = [( - q - l) / b, ( - r - s) / h];
        q = f(p, r);
        - 1 >= g(p, r) && (q = Math.PI);
        1 <= g(p, r) && (q = 0);
        !m && 0 < q && (q -= 2 * Math.PI);
        m && 0 > q && (q += 2 * Math.PI);
        m = b > h ? 1 : b / h;
        r = b > h ?
        h / b : 1;
        b = H.gE(0, 0, b > h ? b : h, k, k + q, !0);
        h = t.oh();
        h.reset();
        h.translate(c, d);
        h.rotate(a.hd, 0, 0);
        h.scale(m, r);
        $c(b, h);
        t.We(h);
        a.nj = b;
        return a.nj
        }
t.g(id, "isClosed", id.prototype.nt);
        t.defineProperty(id, {nt: "isClosed"}, function() {
        return this.Gh
                }, function(a) {
        this.Gh !== a && (this.Gh = a, this.Va = !0)
                });
        t.g(id, "type", id.prototype.type);
        t.defineProperty(id, {type: "type"}, function() {
        return this.da
                }, function(a) {
        e && t.Aa(a, id, id, "type");
                t.L(this, a);
                this.da = a;
                this.Va = !0
                });
        t.g(id, "endX", id.prototype.D);
        t.defineProperty(id, {D: "endX"}, function() {
        return this.kb
                }, function(a) {
        e && t.q(a, id, "endX");
                t.L(this, a);
                this.kb = a;
                this.Va = !0
                });
        t.g(id, "endY", id.prototype.F);
        t.defineProperty(id, {F: "endY"}, function() {
        return this.ub
                }, function(a) {
        e && t.q(a, id, "endY");
                t.L(this, a);
                this.ub = a;
                this.Va = !0
                });
        t.defineProperty(id, {Bb: "point1X"}, function() {
        return this.hd
                }, function(a) {
        e && t.q(a, id, "point1X");
                t.L(this, a);
                this.hd = a;
                this.Va = !0
                });
        t.defineProperty(id, {Rb: "point1Y"}, function() {
        return this.ye
                }, function(a) {
        e && t.q(a, id, "point1Y");
                t.L(this, a);
                this.ye = a;
                this.Va = !0
                });
        t.defineProperty(id, {se: "point2X"}, function() {
        return this.kg
                }, function(a) {
        e && t.q(a, id, "point2X");
                t.L(this, a);
                this.kg = a;
                this.Va = !0
                });
        t.defineProperty(id, {te: "point2Y"}, function() {
        return this.lg
                }, function(a) {
        e && t.q(a, id, "point2Y");
                t.L(this, a);
                this.lg = a;
                this.Va = !0
                });
        t.defineProperty(id, {Da: "centerX"}, function() {
        return this.hd
                }, function(a) {
        e && t.q(a, id, "centerX");
                t.L(this, a);
                this.hd = a;
                this.Va = !0
                });
        t.defineProperty(id, {Pa: "centerY"}, function() {
        return this.ye
                }, function(a) {
        e && t.q(a, id, "centerY");
                t.L(this, a);
                this.ye = a;
                this.Va = !0
                });
        t.defineProperty(id, {radiusX: "radiusX"}, function() {
        return this.kg
                }, function(a) {
        e && t.q(a, id, "radiusX");
                0 > a && t.la(a, ">= zero", id, "radiusX");
                t.L(this, a);
                this.kg = a;
                this.Va = !0
                });
        t.defineProperty(id, {radiusY: "radiusY"}, function() {
        return this.lg
                }, function(a) {
        e && t.q(a, id, "radiusY");
                0 > a && t.la(a, ">= zero", id, "radiusY");
                t.L(this, a);
                this.lg = a;
                this.Va = !0
                });
        t.defineProperty(id, {mh: "startAngle"}, function() {
        return this.kb
                }, function(a) {
        this.kb !== a && (t.L(this, a), e && t.q(a, id, "startAngle"), a %= 360, 0 > a && (a += 360), this.kb = a, this.Va = !0)
                });
        t.defineProperty(id, {hi: "sweepAngle"}, function() {
        return this.ub
                }, function(a) {
        e && t.q(a, id, "sweepAngle");
                t.L(this, a);
                360 < a && (a = 360);
                - 360 > a && (a = - 360);
                this.ub = a;
                this.Va = !0
                });
        t.defineProperty(id, {Mw: "isClockwiseArc"}, function() {
        return this.yn
                }, function(a) {
        t.L(this, a);
                this.yn = a;
                this.Va = !0
                });
        t.defineProperty(id, {Ow: "isLargeArc"}, function() {
        return this.lo
                }, function(a) {
        t.L(this, a);
                this.lo = a;
                this.Va = !0
                });
        t.defineProperty(id, {Bx: "xAxisRotation"}, function() {
        return this.hd
                }, function(a) {
        e && t.q(a, id, "xAxisRotation");
                a %= 360;
                0 > a && (a += 360);
                t.L(this, a);
                this.hd = a;
                this.Va = !0
                });
        function ld() {
        this.U = null;
                this.Bz = (new w(0, 0)).freeze();
                this.Gy = (new w(0, 0)).freeze();
                this.nu = this.gv = 0;
                this.Vu = "";
                this.Rv = this.Cu = !1;
                this.zu = this.pu = 0;
                this.oj = this.Ku = !1;
                this.Lq = null;
                this.Pv = 0;
                this.mg = this.Nv = null
        }
t.ga("InputEvent", ld);
        ld.prototype.copy = function() {
        var a = new ld;
                a.U = this.U;
                a.Bz.assign(this.Ke);
                a.Gy.assign(this.ea);
                a.gv = this.gv;
                a.nu = this.nu;
                a.Vu = this.Vu;
                a.Cu = this.Cu;
                a.Rv = this.Rv;
                a.pu = this.pu;
                a.zu = this.zu;
                a.Ku = this.Ku;
                a.oj = this.oj;
                a.Lq = this.Lq;
                a.Pv = this.Pv;
                a.Nv = this.Nv;
                a.mg = this.mg;
                return a
                };
        ld.prototype.toString = function() {
        var a = "^";
                this.Yc && (a += "M:" + this.Yc);
                this.button && (a += "B:" + this.button);
                this.key && (a += "K:" + this.key);
                this.Ae && (a += "C:" + this.Ae);
                this.Yj && (a += "D:" + this.Yj);
                this.Ee && (a += "h");
                this.bubbles && (a += "b");
                null !== this.ea && (a += "@" + this.ea.toString());
                return a
                };
        t.g(ld, "diagram", ld.prototype.h);
        t.defineProperty(ld, {h: "diagram"}, function() {
        return this.U
                }, function(a) {
        this.U = a
                });
        t.g(ld, "viewPoint", ld.prototype.Ke);
        t.defineProperty(ld, {Ke: "viewPoint"}, function() {
        return this.Bz
                }, function(a) {
        t.l(a, w, ld, "viewPoint");
                this.Bz.assign(a)
                });
        t.g(ld, "documentPoint", ld.prototype.ea);
        t.defineProperty(ld, {ea: "documentPoint"}, function() {
        return this.Gy
                }, function(a) {
        t.l(a, w, ld, "documentPoint");
                this.Gy.assign(a)
                });
        t.g(ld, "modifiers", ld.prototype.Yc);
        t.defineProperty(ld, {Yc: "modifiers"}, function() {
        return this.gv
                }, function(a) {
        this.gv = a
                });
        t.g(ld, "button", ld.prototype.button);
        t.defineProperty(ld, {button: "button"}, function() {
        return this.nu
                }, function(a) {
        this.nu = a
                });
        t.g(ld, "key", ld.prototype.key);
        t.defineProperty(ld, {key: "key"}, function() {
        return this.Vu
                }, function(a) {
        this.Vu = a
                });
        t.g(ld, "down", ld.prototype.$j);
        t.defineProperty(ld, {$j: "down"}, function() {
        return this.Cu
                }, function(a) {
        this.Cu = a
                });
        t.g(ld, "up", ld.prototype.lj);
        t.defineProperty(ld, {lj: "up"}, function() {
        return this.Rv
                }, function(a) {
        this.Rv = a
                });
        t.g(ld, "clickCount", ld.prototype.Ae);
        t.defineProperty(ld, {Ae: "clickCount"}, function() {
        return this.pu
                }, function(a) {
        this.pu = a
                });
        t.g(ld, "delta", ld.prototype.Yj);
        t.defineProperty(ld, {Yj: "delta"}, function() {
        return this.zu
                }, function(a) {
        this.zu = a
                });
        t.g(ld, "handled", ld.prototype.Ee);
        t.defineProperty(ld, {Ee: "handled"}, function() {
        return this.Ku
                }, function(a) {
        this.Ku = a
                });
        t.g(ld, "bubbles", ld.prototype.bubbles);
        t.defineProperty(ld, {bubbles: "bubbles"}, function() {
        return this.oj
                }, function(a) {
        this.oj = a
                });
        t.g(ld, "event", ld.prototype.event);
        t.defineProperty(ld, {event: "event"}, function() {
        return this.Lq
                }, function(a) {
        this.Lq = a
                });
        t.A(ld, {Qw: "isTouchEvent"}, function() {
        var a = window.TouchEvent;
                return a && this.event instanceof a
                });
        t.g(ld, "timestamp", ld.prototype.timestamp);
        t.defineProperty(ld, {timestamp: "timestamp"}, function() {
        return this.Pv
                }, function(a) {
        this.Pv = a
                });
        t.g(ld, "targetDiagram", ld.prototype.nh);
        t.defineProperty(ld, {nh: "targetDiagram"}, function() {
        return this.Nv
                }, function(a) {
        this.Nv = a
                });
        t.g(ld, "targetObject", ld.prototype.ae);
        t.defineProperty(ld, {ae: "targetObject"}, function() {
        return this.mg
                }, function(a) {
        this.mg = a
                });
        t.g(ld, "control", ld.prototype.control);
        t.defineProperty(ld, {control: "control"}, function() {
        return 0 !== (this.Yc & 1)
                }, function(a) {
        this.Yc = a ? this.Yc | 1 : this.Yc & - 2
                });
        t.g(ld, "shift", ld.prototype.shift);
        t.defineProperty(ld, {shift: "shift"}, function() {
        return 0 !== (this.Yc & 4)
                }, function(a) {
        this.Yc = a ? this.Yc | 4 : this.Yc & - 5
                });
        t.g(ld, "alt", ld.prototype.alt);
        t.defineProperty(ld, {alt: "alt"}, function() {
        return 0 !== (this.Yc & 2)
                }, function(a) {
        this.Yc = a ? this.Yc | 2 : this.Yc & - 3
                });
        t.g(ld, "meta", ld.prototype.Ap);
        t.defineProperty(ld, {Ap: "meta"}, function() {
        return 0 !== (this.Yc & 8)
                }, function(a) {
        this.Yc = a ? this.Yc | 8 : this.Yc & - 9
                });
        t.g(ld, "left", ld.prototype.left);
        t.defineProperty(ld, {left: "left"}, function() {
        return 0 === this.button
                }, function(a) {
        this.button = a ? 0 : 2
                });
        t.g(ld, "middle", ld.prototype.mJ);
        t.defineProperty(ld, {mJ: "middle"}, function() {
        return 1 === this.button
                }, function(a) {
        this.button = a ? 1 : 0
                });
        t.g(ld, "right", ld.prototype.right);
        t.defineProperty(ld, {right: "right"}, function() {
        return 2 === this.button
                }, function(a) {
        this.button = a ? 2 : 0
                });
        function rd() {
        this.U = null;
                this.Yb = "";
                this.uv = this.Kv = null;
                this.ou = !1
        }
t.ga("DiagramEvent", rd);
        rd.prototype.copy = function() {
        var a = new rd;
                a.U = this.U;
                a.Yb = this.Yb;
                a.Kv = this.Kv;
                a.uv = this.uv;
                a.ou = this.ou;
                return a
                };
        rd.prototype.toString = function() {
        var a = "*" + this.name;
                this.cancel && (a += "x");
                null !== this.xx && (a += ":" + this.xx.toString());
                null !== this.gx && (a += "(" + this.gx.toString() + ")");
                return a
                };
        t.g(rd, "diagram", rd.prototype.h);
        t.defineProperty(rd, {h: "diagram"}, function() {
        return this.U
                }, function(a) {
        this.U = a
                });
        t.g(rd, "name", rd.prototype.name);
        t.defineProperty(rd, {name: "name"}, function() {
        return this.Yb
                }, function(a) {
        this.Yb = a
                });
        t.g(rd, "subject", rd.prototype.xx);
        t.defineProperty(rd, {xx: "subject"}, function() {
        return this.Kv
                }, function(a) {
        this.Kv = a
                });
        t.g(rd, "parameter", rd.prototype.gx);
        t.defineProperty(rd, {gx: "parameter"}, function() {
        return this.uv
                }, function(a) {
        this.uv = a
                });
        t.g(rd, "cancel", rd.prototype.cancel);
        t.defineProperty(rd, {cancel: "cancel"}, function() {
        return this.ou
                }, function(a) {
        this.ou = a
                });
        function td() {
        this.clear()
        }
t.ga("ChangedEvent", td);
        var ud;
        td.Transaction = ud = t.w(td, "Transaction", - 1);
        var vd;
        td.Property = vd = t.w(td, "Property", 0);
        var wd;
        td.Insert = wd = t.w(td, "Insert", 1);
        var xd;
        td.Remove = xd = t.w(td, "Remove", 2);
        td.prototype.clear = td.prototype.clear = function() {
        this.rq = vd;
                this.lm = this.fv = "";
                this.jv = this.kv = this.qv = this.uo = this.pv = this.U = this.ie = null
                };
        td.prototype.copy = function() {
        var a = new td;
                a.ie = this.ie;
                a.U = this.U;
                a.rq = this.rq;
                a.fv = this.fv;
                a.lm = this.lm;
                a.pv = this.pv;
                var b = this.uo;
                a.uo = t.rb(b) && "function" === typeof b.Z ? b.Z() : b;
                b = this.qv;
                a.qv = t.rb(b) && "function" === typeof b.Z ? b.Z() : b;
                b = this.kv;
                a.kv = t.rb(b) && "function" === typeof b.Z ? b.Z() : b;
                b = this.jv;
                a.jv = t.rb(b) && "function" === typeof b.Z ? b.Z() : b;
                return a
                };
        td.prototype.toString = function() {
        var a = "", a = this.td === ud ? a + "* " : this.td === vd ? a + (null !== this.ba ? "!m" : "!d") : a + ((null !== this.ba ? "!m" : "!d") + this.td);
                this.propertyName && "string" === typeof this.propertyName && (a += " " + this.propertyName);
                this.yf && this.yf !== this.propertyName && (a += " " + this.yf);
                a += ": ";
                this.td === ud ? null !== this.oldValue && (a += " " + this.oldValue) : (null !== this.object && (a += yd(this.object)), null !== this.oldValue && (a += "  old: " + yd(this.oldValue)), null !== this.Uf && (a += " " + this.Uf), null !== this.newValue &&
                (a += "  new: " + yd(this.newValue)), null !== this.Sf && (a += " " + this.Sf));
                return a
                };
        td.prototype.getValue = td.prototype.za = function(a) {
        return a ? this.oldValue : this.newValue
                };
        td.prototype.getParam = function(a) {
        return a ? this.Uf : this.Sf
                };
        td.prototype.canUndo = td.prototype.canUndo = function() {
        return null !== this.ba || null !== this.h ? !0 : !1
                };
        td.prototype.undo = td.prototype.undo = function() {
        this.canUndo() && (null !== this.ba ? this.ba.changeState(this, !0) : null !== this.h && this.h.changeState(this, !0))
                };
        td.prototype.canRedo = td.prototype.canRedo = function() {
        return null !== this.ba || null !== this.h ? !0 : !1
                };
        td.prototype.redo = td.prototype.redo = function() {
        this.canRedo() && (null !== this.ba ? this.ba.changeState(this, !1) : null !== this.h && this.h.changeState(this, !1))
                };
        t.g(td, "model", td.prototype.ba);
        t.defineProperty(td, {ba: "model"}, function() {
        return this.ie
                }, function(a) {
        this.ie = a
                });
        t.g(td, "diagram", td.prototype.h);
        t.defineProperty(td, {h: "diagram"}, function() {
        return this.U
                }, function(a) {
        this.U = a
                });
        t.g(td, "change", td.prototype.td);
        t.defineProperty(td, {td: "change"}, function() {
        return this.rq
                }, function(a) {
        e && t.Aa(a, td, td, "change");
                this.rq = a
                });
        t.g(td, "modelChange", td.prototype.yf);
        t.defineProperty(td, {yf: "modelChange"}, function() {
        return this.fv
                }, function(a) {
        e && t.i(a, "string", td, "modelChange");
                this.fv = a
                });
        t.g(td, "propertyName", td.prototype.propertyName);
        t.defineProperty(td, {propertyName: "propertyName"}, function() {
        return this.lm
                }, function(a) {
        e && "string" !== typeof a && t.l(a, Function, td, "propertyName");
                this.lm = a
                });
        t.g(td, "isTransactionFinished", td.prototype.YI);
        t.A(td, {YI: "isTransactionFinished"}, function() {
        return this.rq === ud && ("CommittedTransaction" === this.lm || "FinishedUndo" === this.lm || "FinishedRedo" === this.lm)
                });
        t.g(td, "object", td.prototype.object);
        t.defineProperty(td, {object: "object"}, function() {
        return this.pv
                }, function(a) {
        this.pv = a
                });
        t.g(td, "oldValue", td.prototype.oldValue);
        t.defineProperty(td, {oldValue: "oldValue"}, function() {
        return this.uo
                }, function(a) {
        this.uo = a
                });
        t.g(td, "oldParam", td.prototype.Uf);
        t.defineProperty(td, {Uf: "oldParam"}, function() {
        return this.qv
                }, function(a) {
        this.qv = a
                });
        t.g(td, "newValue", td.prototype.newValue);
        t.defineProperty(td, {newValue: "newValue"}, function() {
        return this.kv
                }, function(a) {
        this.kv = a
                });
        t.g(td, "newParam", td.prototype.Sf);
        t.defineProperty(td, {Sf: "newParam"}, function() {
        return this.jv
                }, function(a) {
        this.jv = a
                });
        function F(a) {
        1 < arguments.length && t.m("Model constructor can only take one optional argument, the Array of node data.");
                t.Ac(this);
                this.Ay = this.Yb = "";
                this.Ik = this.yC = !1;
                this.fz = {};
                this.Me = [];
                this.Bc = new ja(null, Object);
                this.gm = "key";
                this.tu = this.Zu = null;
                this.sy = this.ty = !1;
                this.Gr = "category";
                this.xh = new ja(null, C);
                this.Bj = null;
                this.Ki = !1;
                this.Az = null;
                this.ja = new zd;
                void 0 !== a && (this.Eg = a)
        }
t.ga("Model", F);
        F.prototype.clear = F.prototype.clear = function() {
        this.Wd && t.Xm(this.Me, "nodeDataArray", this, !0);
                this.Me = [];
                this.Bc.clear();
                this.xh.clear();
                this.ja.clear()
                };
        aa = F.prototype;
        aa.Xt = function() {
        var a = "";
                "" !== this.name && (a += ',\n  "name": ' + this.quote(this.name));
                "" !== this.Lm && (a += ',\n  "dataFormat": ' + this.quote(this.Lm));
                this.ab && (a += ',\n  "isReadOnly": ' + this.ab);
                "key" !== this.hj && "string" === typeof this.hj && (a += ',\n  "nodeKeyProperty": ' + this.quote(this.hj));
                this.nw && (a += ',\n  "copiesArrays": true');
                this.mw && (a += ',\n  "copiesArrayObjects": true');
                "category" !== this.ql && "string" === typeof this.ql && (a += ',\n  "nodeCategoryProperty": ' + this.quote(this.ql));
                return a
                };
        aa.sB = function() {
        var a = "", b = this.CA, c = !1, d;
                for (d in b)
                if (!Ad(d, b[d])) {
        c = !0;
                break
                }
        c && (a = ',\n  "modelData": ' + Bd(this, b));
                return a + ',\n  "nodeDataArray": ' + Cd(this, this.Eg, !0)
                };
        aa.Gt = function(a) {
        a.name && (this.name = a.name);
                a.dataFormat && (this.Lm = a.dataFormat);
                a.isReadOnly && (this.ab = a.isReadOnly);
                a.nodeKeyProperty && (this.hj = a.nodeKeyProperty);
                a.copiesArrays && (this.nw = a.copiesArrays);
                a.copiesArrayObjects && (this.mw = a.copiesArrayObjects);
                a.nodeCategoryProperty && (this.ql = a.nodeCategoryProperty)
                };
        aa.QA = function(a) {
        var b = a.modelData;
                b && (Kd(this, b), this.CA = b);
                if (a = a.nodeDataArray)
                Kd(this, a), this.Eg = a
                };
        aa.toString = function(a) {
        void 0 === a && (a = 0);
                if (1 < a)
                return this.jB();
                var b = ("" !== this.name ? this.name : "") + " Model";
                if (0 < a) {
        b += "\n node data:";
                a = this.Eg;
                var c = t.vb(a), d;
                for (d = 0; d < c; d++)
                var f = t.mb(a, d), b = b + (" " + this.Hb(f) + ":" + yd(f))
                }
        return b
                };
        F.prototype.toJson = F.prototype.toJSON = F.prototype.jB = function(a) {
        void 0 === a && (a = this.constructor === F ? "go.Model" : this.constructor === P ? "go.GraphLinksModel" : this.constructor === Ld ? "go.TreeModel" : t.ug(this));
                return'{ "class": ' + this.quote(a) + this.Xt() + this.sB() + "}"
                };
        F.fromJson = F.fromJSON = function(a, b) {
        void 0 === b && (b = null);
                b && t.l(b, F, F, "fromJson:model");
                var c = null;
                if ("string" === typeof a)
                if (window && window.JSON && window.JSON.parse)
                try {
                c = window.JSON.parse(a)
                        } catch (d) {
        e && t.trace("JSON.parse error: " + d.toString())
                }
        else
                t.trace("WARNING: no JSON.parse available");
                else
                "object" === typeof a ? c = a : t.m("Unable to construct a Model from: " + a);
                if (null === b) {
        var f;
                f = null;
                var g = c["class"];
                if ("string" === typeof g)
                try {
                var h = null;
                        0 === g.indexOf("go.") ? (g = g.substr(3), h = ca[g]) : (h = ca[g]) ||
                        (h = window[g]);
                        "function" === typeof h && (f = new h)
                        } catch (k) {
        }
        null === f || f instanceof F ? b = f : t.m("Unable to construct a Model of declared class: " + c["class"])
                }
        null === b && (b = new P);
                b.Gt(c);
                b.QA(c);
                return b
                };
        function Kd(a, b) {
        if (t.isArray(b))
                for (var c = t.vb(b), d = 0; d < c; d++) {
        var f = t.mb(b, d);
                t.rb(f) && t.MD(b, d, Kd(a, f))
        }
        else if (t.rb(b)) {
        for (d in b)
                if (f = b[d], t.rb(f) && (f = Kd(a, f), b[d] = f, "points" === d && Array.isArray(f))) {
        for (var g = 0 === f.length % 2, h = 0; h < f.length; h++)
                if ("number" !== typeof f[h]) {
        g = !1;
                break
        }
        if (g) {
        g = new B(w);
                for (h = 0; h < f.length / 2; h++) {
        var k = new w(f[2 * h], f[2 * h + 1]);
                g.add(k)
        }
        g.freeze();
                b[d] = g
        }
        }
        if ("object" !== typeof b)
                c = b;
                else {
                d = b;
                        f = b["class"];
                        if ("NaN" === f)
                        d = NaN;
                        else if ("Date" === f)
                        d = new Date(b.value);
                        else if ("go.Point" ===
                                f)
                        d = new w(Md(b.x), Md(b.y));
                        else if ("go.Size" === f)
                        d = new ga(Md(b.width), Md(b.height));
                        else if ("go.Rect" === f)
                        d = new x(Md(b.x), Md(b.y), Md(b.width), Md(b.height));
                        else if ("go.Margin" === f)
                        d = new ab(Md(b.top), Md(b.right), Md(b.bottom), Md(b.left));
                        else if ("go.Spot" === f)
                        d = "string" === typeof b["enum"] ? vb(b["enum"]) : new I(Md(b.x), Md(b.y), Md(b.offsetX), Md(b.offsetY));
                        else if ("go.Brush" === f) {
                if (d = new fa, d.type = t.Om(fa, b.type), b.start instanceof I && (d.start = b.start), b.end instanceof I && (d.end = b.end), "number" === typeof b.startRadius &&
                        (d.Up = Md(b.startRadius)), "number" === typeof b.endRadius && (d.$o = Md(b.endRadius)), f = b.colorStops)
                        for (c in f)
                        d.addColorStop(parseFloat(c), f[c])
                } else
                        "go.Geometry" === f && (d = "string" === typeof b.path ? Rc(b.path) : new zc, d.type = t.Om(zc, b.type), "number" === typeof b.startX && (d.qa = Md(b.startX)), "number" === typeof b.startY && (d.ra = Md(b.startY)), "number" === typeof b.endX && (d.D = Md(b.endX)), "number" === typeof b.endY && (d.F = Md(b.endY)), b.spot1 instanceof I && (d.G = b.spot1), b.spot2 instanceof I && (d.H = b.spot2));
                        c = d
                }
        return c
        }
        return b
        }
F.prototype.quote = function(a) {
for (var b = "", c = a.length, d = 0; d < c; d++)
        var f = a[d], b = '"' === f || "\\" === f ? b + ("\\" + f) : "\b" === f ? b + "\\b" : "\f" === f ? b + "\\f" : "\n" === f ? b + "\\n" : "\r" === f ? b + "\\r" : "\t" === f ? b + "\\t" : b + f;
        return'"' + b + '"'
        };
        F.prototype.writeJsonValue = F.prototype.Yt = function(a) {
        return void 0 === a ? "undefined" : null === a ? "null" : !0 === a ? "true" : !1 === a ? "false" : "string" === typeof a ? this.quote(a) : "number" === typeof a ? Infinity === a ? "9e9999" : - Infinity === a ? "-9e9999" : isNaN(a) ? '{"class":"NaN"}' : a.toString() : a instanceof Date ? '{"class":"Date", "value":"' + a.toJSON() + '"}' : a instanceof Number ? this.Yt(a.valueOf()) : t.isArray(a) ? Cd(this, a) : t.rb(a) ? Bd(this, a) : "function" === typeof a ? "null" : a.toString()
                };
        function Cd(a, b, c) {
        var d = t.vb(b), f = "[ ";
                c && 1 < d && (f += "\n");
                for (var g = 0; g < d; g++) {
        var h = t.mb(b, g);
                void 0 !== h && (0 < g && (f += ",", c && (f += "\n")), f += a.Yt(h))
        }
        c && 1 < d && (f += "\n");
                return f + " ]"
        }
function Ad(a, b) {
return void 0 === b || "__gohashid" === a || "_" === a[0] || "function" === typeof b ? !0 : !1
        }
function Nd(a) {
return isNaN(a) ? "NaN" : Infinity === a ? "9e9999" : - Infinity === a ? "-9e9999" : a
        }
function Bd(a, b) {
var c = b;
        if (c instanceof w)
        b = {"class": "go.Point", x: Nd(c.x), y: Nd(c.y)};
        else if (c instanceof ga)
        b = {"class": "go.Size", width: Nd(c.width), height: Nd(c.height)};
        else if (c instanceof x)
        b = {"class": "go.Rect", x: Nd(c.x), y: Nd(c.y), width: Nd(c.width), height: Nd(c.height)};
        else if (c instanceof ab)
        b = {"class": "go.Margin", top: Nd(c.top), right: Nd(c.right), bottom: Nd(c.bottom), left: Nd(c.left)};
        else if (c instanceof I)
        b = c.vd() ? {"class": "go.Spot", x: Nd(c.x), y: Nd(c.y), offsetX: Nd(c.offsetX), offsetY: Nd(c.offsetY)} :
        {"class": "go.Spot", "enum": c.toString()};
        else if (c instanceof fa) {
b = {"class": "go.Brush", type: c.type.name};
        if (c.type === Od)
        b.color = c.color;
        else if (c.type === Zd || c.type === $d)
        b.start = c.start, b.end = c.end, c.type === $d && (0 !== c.Up && (b.startRadius = Nd(c.Up)), isNaN(c.$o) || (b.endRadius = Nd(c.$o)));
        if (null !== c.Vo) {
for (var d = {}, c = c.Vo.k; c.next(); )
        d[c.key.toString()] = c.value;
        b.colorStops = d
        }
} else if (c instanceof zc)
        b = {"class": "go.Geometry", type: c.type.name}, 0 !== c.qa && (b.startX = Nd(c.qa)), 0 !== c.ra && (b.startY = Nd(c.ra)),
        0 !== c.D && (b.endX = Nd(c.D)), 0 !== c.F && (b.endY = Nd(c.F)), c.G.M(Eb) || (b.spot1 = c.G), c.H.M(Pb) || (b.spot2 = c.H), c.type === Ac && (b.path = Pc(c));
        else if (c instanceof Q || c instanceof z || c instanceof ae || c instanceof F || c instanceof be || c instanceof oa || c instanceof ce || c instanceof ra || c instanceof zd || c instanceof de)
        return t.trace("ERROR: trying to convert a GraphObject or Diagram or Model or Tool or Layout or UndoManager into JSON text: " + c.toString()), "{}";
        var d = "{", f = !0, g;
        for (g in b)
        if (c = t.hb(b, g), !Ad(g, c))
        if (f ?
                f = !1 : d += ", ", d += '"' + g + '":', "points" === g && c instanceof B && c.da === w) {
for (var h = "[", c = c.k; c.next(); ) {
var k = c.value;
        1 < h.length && (h += ",");
        h += a.Yt(k.x);
        h += ",";
        h += a.Yt(k.y)
        }
h += "]";
        d += h
        } else
        d += a.Yt(c);
        return d + "}"
        }
function Md(a) {
return"number" === typeof a ? a : "NaN" === a ? NaN : "9e9999" === a ? Infinity : "-9e9999" === a ? - Infinity : parseFloat(a)
        }
t.g(F, "name", F.prototype.name);
        t.defineProperty(F, {name: "name"}, function() {
        return this.Yb
                }, function(a) {
        var b = this.Yb;
                b !== a && (t.i(a, "string", F, "name"), this.Yb = a, this.j("name", b, a))
                });
        t.g(F, "dataFormat", F.prototype.Lm);
        t.defineProperty(F, {Lm: "dataFormat"}, function() {
        return this.Ay
                }, function(a) {
        var b = this.Ay;
                b !== a && (t.i(a, "string", F, "dataFormat"), this.Ay = a, this.j("dataFormat", b, a))
                });
        t.g(F, "knockoutJS", F.prototype.Wd);
        t.defineProperty(F, {Wd: "knockoutJS"}, function() {
        return this.yC
                }, function(a) {
        this.yC = a;
                t.zc || (t.zc = "object" === typeof window.ko && "function" === typeof window.ko.isObservable ? window.ko.isObservable : null, a && null === t.zc && t.trace("No value for ko.isObservable: is KnockoutJS library not loaded?"))
                });
        t.g(F, "isReadOnly", F.prototype.ab);
        t.defineProperty(F, {ab: "isReadOnly"}, function() {
        return this.Ik
                }, function(a) {
        var b = this.Ik;
                b !== a && (t.i(a, "boolean", F, "isReadOnly"), this.Ik = a, this.j("isReadOnly", b, a))
                });
        t.g(F, "modelData", F.prototype.CA);
        t.defineProperty(F, {CA: "modelData"}, function() {
        return this.fz
                }, function(a) {
        var b = this.fz;
                b !== a && (t.i(a, "object", F, "modelData"), this.fz = a, this.j("modelData", b, a))
                });
        F.prototype.addChangedListener = F.prototype.Iz = function(a) {
        t.i(a, "function", F, "addChangedListener:listener");
                null === this.Bj && (this.Bj = new B("function"));
                this.Bj.add(a)
                };
        F.prototype.removeChangedListener = F.prototype.UA = function(a) {
        t.i(a, "function", F, "removeChangedListener:listener");
                null !== this.Bj && (this.Bj.remove(a), 0 === this.Bj.count && (this.Bj = null))
                };
        F.prototype.dw = function(a) {
        this.Wa || this.ja.OE(a);
                if (null !== this.Bj) {
        var b = this.Bj, c = b.length;
                if (1 === c)
                b = b.wa(0), b(a);
                else if (0 !== c)
                for (var d = b.Ie(), f = 0; f < c; f++)
                b = d[f], b(a)
                }
        };
        F.prototype.raiseChangedEvent = F.prototype.Zc = function(a, b, c, d, f, g, h) {
        oe(this, "", a, b, c, d, f, g, h)
                };
        F.prototype.raiseChanged = F.prototype.j = function(a, b, c, d, f) {
        oe(this, "", vd, a, this, b, c, d, f)
                };
        F.prototype.raiseDataChanged = F.prototype.ix = function(a, b, c, d, f, g) {
        oe(this, "", vd, b, a, c, d, f, g)
                };
        function oe(a, b, c, d, f, g, h, k, l) {
        void 0 === k && (k = null);
                void 0 === l && (l = null);
                var m = new td;
                m.ba = a;
                m.td = c;
                m.yf = b;
                m.propertyName = d;
                m.object = f;
                m.oldValue = g;
                m.Uf = k;
                m.newValue = h;
                m.Sf = l;
                a.dw(m)
        }
t.g(F, "undoManager", F.prototype.ja);
        t.defineProperty(F, {ja: "undoManager"}, function() {
        return this.Az
                }, function(a) {
        var b = this.Az;
                b !== a && (t.l(a, zd, F, "undoManager"), null !== b && b.GJ(this), this.Az = a, null !== a && a.CH(this))
                });
        t.g(F, "skipsUndoManager", F.prototype.Wa);
        t.defineProperty(F, {Wa: "skipsUndoManager"}, function() {
        return this.Ki
                }, function(a) {
        t.i(a, "boolean", F, "skipsUndoManager");
                this.Ki = a
                });
        F.prototype.changeState = function(a, b) {
        if (null !== a && a.ba === this)
                if (a.td === vd) {
        var c = a.object, d = a.propertyName, f = a.za(b);
                t.Ra(c, d, f)
                } else
                a.td === wd ? "nodeDataArray" === a.yf ? (c = a.newValue, t.rb(c) && (d = this.Hb(c), void 0 !== d && (b ? (this.Wd && t.wf(c, this, !0), t.Ti(this.Me, a.Sf), this.Bc.remove(d)) : (this.Wd && t.wf(c, this, !1), t.Si(this.Me, a.Sf, c), this.Bc.add(d, c))))) : "" === a.yf ? (c = a.object, !t.isArray(c) && a.propertyName && (c = t.hb(a.object, a.propertyName)), t.isArray(c) && (d = a.newValue, f = a.Sf, b ? t.Ti(c, f) : t.Si(c, f, d))) :
                t.m("unknown ChangedEvent.Insert object: " + a.toString()) : a.td === xd ? "nodeDataArray" === a.yf ? (c = a.oldValue, t.rb(c) && (d = this.Hb(c), void 0 !== d && (b ? (this.Wd && t.wf(c, this, !1), t.Si(this.Me, a.Uf, c), this.Bc.add(d, c)) : (this.Wd && t.wf(c, this, !0), t.Ti(this.Me, a.Uf), this.Bc.remove(d))))) : "" === a.yf ? (c = a.object, !t.isArray(c) && a.propertyName && (c = t.hb(a.object, a.propertyName)), t.isArray(c) && (d = a.oldValue, f = a.Uf, b ? t.Si(c, f, d) : t.Ti(c, f))) : t.m("unknown ChangedEvent.Remove object: " + a.toString()) : a.td !== ud && t.m("unknown ChangedEvent: " +
                a.toString())
                };
        F.prototype.startTransaction = F.prototype.tc = function(a) {
        return this.ja.tc(a)
                };
        F.prototype.commitTransaction = F.prototype.Ce = function(a) {
        return this.ja.Ce(a)
                };
        F.prototype.rollbackTransaction = F.prototype.Mp = function() {
        return this.ja.Mp()
                };
        F.prototype.updateTargetBindings = F.prototype.Qb = function(a, b) {
        void 0 === b && (b = "");
                oe(this, "SourceChanged", ud, b, a, null, null)
                };
        t.g(F, "nodeKeyProperty", F.prototype.hj);
        t.defineProperty(F, {hj: "nodeKeyProperty"}, function() {
        return this.gm
                }, function(a) {
        var b = this.gm;
                b !== a && (pe(a, F, "nodeKeyProperty"), 0 < this.Bc.count && t.m("Cannot set Model.nodeKeyProperty when there is existing node data"), this.gm = a, this.j("nodeKeyProperty", b, a))
                });
        function pe(a, b, c) {
        "string" !== typeof a && "function" !== typeof a && t.bc(a, "string or function", b, c)
        }
F.prototype.getKeyForNodeData = F.prototype.Hb = function(a) {
if (null !== a) {
var b = this.gm;
        if ("" !== b && (b = t.hb(a, b), void 0 !== b)) {
if (qe(b))
        return b;
        t.m("Key value for node data " + a + " is not a number or a string: " + b)
        }
}
};
        F.prototype.setKeyForNodeData = F.prototype.bB = function(a, b) {
        null === b && (b = void 0);
                void 0 === b || qe(b) || t.bc(b, "number or string", F, "setKeyForNodeData:key");
                if (null !== a) {
        var c = this.gm;
                if ("" !== c)
                if (this.le(a)) {
        var d = t.hb(a, c);
                d !== b && null === this.tf(b) && (t.Ra(a, c, b), this.Bc.remove(d), this.Bc.add(b, a), oe(this, "nodeKey", vd, c, a, d, b), "string" === typeof c && this.Qb(a, c), this.Ht(d, b))
                } else
                t.Ra(a, c, b)
                }
        };
        t.g(F, "makeUniqueKeyFunction", F.prototype.iJ);
        t.defineProperty(F, {iJ: "makeUniqueKeyFunction"}, function() {
        return this.Zu
                }, function(a) {
        var b = this.Zu;
                b !== a && (null !== a && t.i(a, "function", F, "makeUniqueKeyFunction"), this.Zu = a, this.j("makeUniqueKeyFunction", b, a))
                });
        function qe(a) {
        return"number" === typeof a || "string" === typeof a
        }
F.prototype.containsNodeData = F.prototype.le = function(a) {
a = this.Hb(a);
        return void 0 === a ? !1 : this.Bc.contains(a)
        };
        F.prototype.findNodeDataForKey = F.prototype.tf = function(a) {
        null === a && t.m("Model.findNodeDataForKey:key must not be null");
                return void 0 !== a && qe(a) ? this.Bc.za(a) : null
                };
        t.g(F, "nodeDataArray", F.prototype.Eg);
        t.defineProperty(F, {Eg: "nodeDataArray"}, function() {
        return this.Me
                }, function(a) {
        var b = this.Me;
                if (b !== a) {
        t.Rs(a, F, "nodeDataArray");
                this.Wd && t.zc && (null !== b && t.Xm(b, "nodeDataArray", this, !0), a = t.Xm(a, "nodeDataArray", this, !1));
                this.Bc.clear();
                this.nB();
                for (var c = t.vb(a), d = 0; d < c; d++) {
        var f = t.mb(a, d);
                if (!t.rb(f)) {
        t.m("Model.nodeDataArray must only contain Objects, not: " + f);
                return
                }
        t.it(f)
                }
        this.Me = a;
                for (var g = new B(Object), d = 0; d < c; d++) {
        var f = t.mb(a, d), h = this.Hb(f);
                void 0 === h ? g.add(f) : null !== this.Bc.za(h) ?
                g.add(f) : this.Bc.add(h, f)
                }
        for (d = g.k; d.next(); )
                f = d.value, this.rF(f), g = this.Hb(f), this.Bc.add(g, f);
                oe(this, "nodeDataArray", vd, "nodeDataArray", this, b, a);
                for (d = 0; d < c; d++)
                f = t.mb(a, d), this.Lp(f), this.Kp(f);
                this.UD();
                t.VI(a) || (this.ab = !0)
                }
        });
        F.prototype.makeNodeDataKeyUnique = F.prototype.rF = function(a) {
        if (null !== a) {
        var b = this.gm;
                if ("" !== b) {
        var c = this.Hb(a);
                if (void 0 === c || this.Bc.contains(c)) {
        var d = this.Zu;
                if (null !== d && (c = d(this, a), void 0 !== c && null !== c && !this.Bc.contains(c))) {
        t.Ra(a, b, c);
                return
                }
        if ("string" === typeof c) {
        for (d = 2; this.Bc.contains(c + d); )
                d++;
                t.Ra(a, b, c + d)
                } else if (void 0 === c || "number" === typeof c) {
        for (d = - this.Bc.count - 1; this.Bc.contains(d); )
                d--;
                t.Ra(a, b, d)
                } else
                t.m("Model.getKeyForNodeData returned something other than a string or a number: " +
                        c)
                }
        }
        }
        };
        F.prototype.addNodeData = F.prototype.xm = function(a) {
        if (null !== a) {
        this.Wd && t.wf(a, this, !1);
                t.it(a);
                var b = this.Hb(a);
                if (void 0 === b || this.Bc.za(b) !== a)
                this.rF(a), b = this.Hb(a), this.Bc.add(b, a), b = t.vb(this.Me), t.Si(this.Me, b, a), oe(this, "nodeDataArray", wd, "nodeDataArray", this, null, a, null, b), this.Lp(a), this.Kp(a)
                }
        };
        F.prototype.addNodeDataCollection = function(a) {
        if (t.isArray(a))
                for (var b = t.vb(a), c = 0; c < b; c++)
                this.xm(t.mb(a, c));
                else
                for (a = a.k; a.next(); )
                this.xm(a.value)
                };
        F.prototype.removeNodeData = F.prototype.jx = function(a) {
        if (null !== a) {
        var b = this.Hb(a);
                void 0 !== b && this.Bc.contains(b) && (this.Wd && t.wf(a, this, !0), this.Bc.remove(b), b = t.Pz(this.Me, a), 0 > b || (t.Ti(this.Me, b), oe(this, "nodeDataArray", xd, "nodeDataArray", this, a, null, b, null), this.Wt(a)))
                }
        };
        F.prototype.removeNodeDataCollection = function(a) {
        if (t.isArray(a))
                for (var b = t.vb(a), c = 0; c < b; c++)
                this.jx(t.mb(a, c));
                else
                for (a = a.k; a.next(); )
                this.jx(a.value)
                };
        aa = F.prototype;
        aa.Ht = function(a, b) {
        var c = re(this, a);
                c instanceof C && this.xh.add(b, c)
                };
        aa.nB = function() {
        };
        aa.Lp = function() {
        };
        aa.Kp = function() {
        };
        aa.Wt = function() {
        };
        function se(a, b, c) {
        if (void 0 !== b) {
        var d = a.xh.za(b);
                null === d && (d = new C, a.xh.add(b, d));
                d.add(c)
        }
        }
function ze(a, b, c) {
if (void 0 !== b) {
var d = a.xh.za(b);
        d instanceof C && (void 0 === c || null === c ? a.xh.remove(b) : (d.remove(c), 0 === d.count && a.xh.remove(b)))
        }
}
function re(a, b) {
if (void 0 === b)
        return null;
        var c = a.xh.za(b);
        return c instanceof C ? c : null
        }
F.prototype.clearUnresolvedReferences = F.prototype.UD = function(a) {
void 0 === a ? this.xh.clear() : this.xh.remove(a)
        };
        t.g(F, "copyNodeDataFunction", F.prototype.gI);
        t.defineProperty(F, {gI: "copyNodeDataFunction"}, function() {
        return this.tu
                }, function(a) {
        var b = this.tu;
                b !== a && (null !== a && t.i(a, "function", F, "copyNodeDataFunction"), this.tu = a, this.j("copyNodeDataFunction", b, a))
                });
        t.g(F, "copiesArrays", F.prototype.nw);
        t.defineProperty(F, {nw: "copiesArrays"}, function() {
        return this.ty
                }, function(a) {
        var b = this.ty;
                b !== a && (null !== a && t.i(a, "boolean", F, "copiesArrays"), this.ty = a, this.j("copiesArrays", b, a))
                });
        t.g(F, "copiesArrayObjects", F.prototype.mw);
        t.defineProperty(F, {mw: "copiesArrayObjects"}, function() {
        return this.sy
                }, function(a) {
        var b = this.sy;
                b !== a && (null !== a && t.i(a, "boolean", F, "copiesArrayObjects"), this.sy = a, this.j("copiesArrayObjects", b, a))
                });
        F.prototype.copyNodeData = function(a) {
        if (null === a)
                return null;
                var b = null, b = this.tu;
                if (null !== b)
                b = b(a, this);
                else {
                var b = new a.constructor, c;
                        for (c in a) {
                var d = t.hb(a, c);
                        if ((!e || !Ae(a, c, d)) && this.nw && Array.isArray(d)) {
                for (var f = [], g = 0; g < d.length; g++) {
                var h = d[g];
                        if (this.mw && t.rb(h)) {
                var k = new h.constructor, l;
                        for (l in h) {
                var m = t.hb(h, l);
                        e && Ae(h, l, m);
                        t.Ra(k, l, m)
                        }
                h = k
                        }
                f.push(h)
                        }
                d = f
                        }
                t.Ra(b, c, d)
                        }
                this.Wd && t.wf(b, this, !1)
                        }
        b && t.Ac(b);
                return b
                };
        function Ae(a, b, c) {
        return c instanceof Q || c instanceof z || c instanceof ae || c instanceof Be || c instanceof Ce || c instanceof be || c instanceof oa || c instanceof ce || c instanceof ld || c instanceof rd ? ("_" !== b[0] && t.trace("Warning: found GraphObject or Diagram reference when copying model data on property '" + b + "' of data object: " + a.toString() + "  \nModel data should not have any references to a Diagram or any part of a diagram, such as: " + c.toString()), !0) : c instanceof F || c instanceof zd || c instanceof de ||
                c instanceof td ? !0 : !1
        }
F.prototype.setDataProperty = function(a, b, c) {
e && (t.i(a, "object", F, "setDataProperty:data"), t.i(b, "string", F, "setDataProperty:propname"), "" === b && t.m("Model.setDataProperty: property name must not be an empty string when setting " + a + " to " + c));
        if (this.le(a))
        if (b === this.hj)
        this.bB(a, c);
        else {
        if (b === this.ql) {
        this.ox(a, c);
                return
                }
        }
else
        !t.Yp && a instanceof Q && (t.Yp = !0, t.trace('Model.setDataProperty is modifying a GraphObject, "' + a.toString() + '"'), t.trace("  Is that really your intent?"));
        var d = t.hb(a, b);
        d !==
        c && (t.Ra(a, b, c), this.ix(a, b, d, c))
        };
        F.prototype.addArrayItem = function(a, b) {
        this.SI(a, - 1, b)
                };
        F.prototype.insertArrayItem = F.prototype.SI = function(a, b, c) {
        e && (t.Rs(a, F, "insertArrayItem:arr"), t.q(b, F, "insertArrayItem:idx"));
                a === this.Me && t.m("Model.insertArrayItem or Model.addArrayItem should not be called on the Model.nodeDataArray");
                0 > b && (b = t.vb(a));
                t.Si(a, b, c);
                oe(this, "", wd, "", a, null, c, null, b)
                };
        F.prototype.removeArrayItem = function(a, b) {
        void 0 === b && (b = - 1);
                e && (t.Rs(a, F, "removeArrayItem:arr"), t.q(b, F, "removeArrayItem:idx"));
                a === this.Me && t.m("Model.removeArrayItem should not be called on the Model.nodeDataArray");
                - 1 === b && (b = t.vb(a) - 1);
                var c = t.mb(a, b);
                t.Ti(a, b);
                oe(this, "", xd, "", a, c, null, b, null)
                };
        t.g(F, "nodeCategoryProperty", F.prototype.ql);
        t.defineProperty(F, {ql: "nodeCategoryProperty"}, function() {
        return this.Gr
                }, function(a) {
        var b = this.Gr;
                b !== a && (pe(a, F, "nodeCategoryProperty"), this.Gr = a, this.j("nodeCategoryProperty", b, a))
                });
        F.prototype.getCategoryForNodeData = F.prototype.getCategoryForNodeData = function(a) {
        if (null === a)
                return"";
                var b = this.Gr;
                if ("" === b)
                return"";
                b = t.hb(a, b);
                if (void 0 === b)
                return"";
                if ("string" === typeof b)
                return b;
                t.m("getCategoryForNodeData found a non-string category for " + a + ": " + b);
                return""
                };
        F.prototype.setCategoryForNodeData = F.prototype.ox = function(a, b) {
        t.i(b, "string", F, "setCategoryForNodeData:cat");
                if (null !== a) {
        var c = this.Gr;
                if ("" !== c)
                if (this.le(a)) {
        var d = t.hb(a, c);
                void 0 === d && (d = "");
                d !== b && (t.Ra(a, c, b), oe(this, "nodeCategory", vd, c, a, d, b))
                } else
                t.Ra(a, c, b)
                }
        };
        function P(a, b) {
        2 < arguments.length && t.m("GraphLinksModel constructor can only take two optional arguments, the Array of node data and the Array of link data.");
                F.call(this);
                this.Vg = [];
                this.bm = new C(Object);
                this.wk = this.su = null;
                this.xj = "from";
                this.Aj = "to";
                this.or = this.nr = "";
                this.kr = "category";
                this.Jh = this.mv = "";
                this.lv = "isGroup";
                this.Hj = "group";
                this.uy = !1;
                void 0 !== a && (this.Eg = a);
                void 0 !== b && (this.gj = b)
        }
t.ga("GraphLinksModel", P);
        t.Ka(P, F);
        P.prototype.clear = P.prototype.clear = function() {
        F.prototype.clear.call(this);
                this.Wd && t.Xm(this.Vg, "linkDataArray", this, !0);
                this.Vg = [];
                this.bm.clear()
                };
        aa = P.prototype;
        aa.toString = function(a) {
        void 0 === a && (a = 0);
                if (2 <= a)
                return this.jB();
                var b = ("" !== this.name ? this.name : "") + " GraphLinksModel";
                if (0 < a) {
        b += "\n node data:";
                a = this.Eg;
                var c = t.vb(a), d;
                for (d = 0; d < c; d++)
                var f = t.mb(a, d), b = b + (" " + this.Hb(f) + ":" + yd(f));
                b += "\n link data:";
                a = this.gj;
                c = t.vb(a);
                for (d = 0; d < c; d++)
                f = t.mb(a, d), b += " " + this.hl(f) + "--\x3e" + this.ll(f)
                }
        return b
                };
        aa.Xt = function() {
        var a = F.prototype.Xt.call(this), b = "";
                "category" !== this.tp && "string" === typeof this.tp && (b += ',\n  "linkCategoryProperty": ' + this.quote(this.tp));
                "from" !== this.Ym && "string" === typeof this.Ym && (b += ',\n  "linkFromKeyProperty": ' + this.quote(this.Ym));
                "to" !== this.Zm && "string" === typeof this.Zm && (b += ',\n  "linkToKeyProperty": ' + this.quote(this.Zm));
                "" !== this.up && "string" === typeof this.up && (b += ',\n  "linkFromPortIdProperty": ' + this.quote(this.up));
                "" !== this.yp && "string" === typeof this.yp && (b +=
                        ',\n  "linkToPortIdProperty": ' + this.quote(this.yp));
                "" !== this.Bt && "string" === typeof this.Bt && (b += ',\n  "nodeIsLinkLabelProperty": ' + this.quote(this.Bt));
                "" !== this.vp && "string" === typeof this.vp && (b += ',\n  "linkLabelKeysProperty": ' + this.quote(this.vp));
                "isGroup" !== this.Hp && "string" === typeof this.Hp && (b += ',\n  "nodeIsGroupProperty": ' + this.quote(this.Hp));
                "group" !== this.dn && "string" === typeof this.dn && (b += ',\n  "nodeGroupKeyProperty": ' + this.quote(this.dn));
                return a + b
                };
        aa.sB = function() {
        var a = F.prototype.sB.call(this), b = ',\n  "linkDataArray": ' + Cd(this, this.gj, !0);
                return a + b
                };
        aa.Gt = function(a) {
        F.prototype.Gt.call(this, a);
                a.linkFromKeyProperty && (this.Ym = a.linkFromKeyProperty);
                a.linkToKeyProperty && (this.Zm = a.linkToKeyProperty);
                a.linkFromPortIdProperty && (this.up = a.linkFromPortIdProperty);
                a.linkToPortIdProperty && (this.yp = a.linkToPortIdProperty);
                a.linkCategoryProperty && (this.tp = a.linkCategoryProperty);
                a.nodeIsLinkLabelProperty && (this.Bt = a.nodeIsLinkLabelProperty);
                a.linkLabelKeysProperty && (this.vp = a.linkLabelKeysProperty);
                a.nodeIsGroupProperty && (this.Hp = a.nodeIsGroupProperty);
                a.nodeGroupKeyProperty && (this.dn = a.nodeGroupKeyProperty)
                };
        aa.QA = function(a) {
        F.prototype.QA.call(this, a);
                if (a = a.linkDataArray)
                Kd(this, a), this.gj = a
                };
        P.prototype.changeState = function(a, b) {
        if (a.td === wd) {
        var c = null;
                "linkDataArray" === a.yf ? c = this.Vg : "linkLabelKeys" === a.yf && (c = this.jl(a.object));
                if (t.isArray(c)) {
        b ? (this.Wd && t.rb(a.newValue) && t.wf(a.newValue, this, !0), t.Ti(c, a.Sf)) : (this.Wd && t.rb(a.newValue) && t.wf(a.newValue, this, !1), t.Si(c, a.Sf, a.newValue));
                return
                }
        } else if (a.td === xd && (c = null, "linkDataArray" === a.yf ? c = this.Vg : "linkLabelKeys" === a.yf && (c = this.jl(a.object)), t.isArray(c))) {
        b ? (this.Wd && t.rb(a.oldValue) && t.wf(a.oldValue, this, !1), t.Si(c, a.Uf,
                a.oldValue)) : (this.Wd && t.rb(a.oldValue) && t.wf(a.oldValue, this, !0), t.Ti(c, a.Uf));
                return
                }
        F.prototype.changeState.call(this, a, b)
                };
        t.g(P, "archetypeNodeData", P.prototype.Os);
        t.defineProperty(P, {Os: "archetypeNodeData"}, function() {
        return this.wk
                }, function(a) {
        var b = this.wk;
                b !== a && (null !== a && t.l(a, Object, P, "archetypeNodeData"), this.wk = a, this.j("archetypeNodeData", b, a))
                });
        P.prototype.an = function(a) {
        if (void 0 !== a) {
        var b = this.wk;
                if (null !== b) {
        var c = this.tf(a);
                null === c && (c = this.copyNodeData(b), t.Ra(c, this.gm, a), this.xm(c))
                }
        return a
                }
        };
        t.g(P, "linkFromKeyProperty", P.prototype.Ym);
        t.defineProperty(P, {Ym: "linkFromKeyProperty"}, function() {
        return this.xj
                }, function(a) {
        var b = this.xj;
                b !== a && (pe(a, P, "linkFromKeyProperty"), this.xj = a, this.j("linkFromKeyProperty", b, a))
                });
        P.prototype.getFromKeyForLinkData = P.prototype.hl = function(a) {
        if (null !== a) {
        var b = this.xj;
                if ("" !== b && (b = t.hb(a, b), void 0 !== b)) {
        if (qe(b))
                return b;
                t.m("FromKey value for link data " + a + " is not a number or a string: " + b)
                }
        }
        };
        P.prototype.setFromKeyForLinkData = P.prototype.qx = function(a, b) {
        null === b && (b = void 0);
                void 0 === b || qe(b) || t.bc(b, "number or string", P, "setFromKeyForLinkData:key");
                if (null !== a) {
        var c = this.xj;
                if ("" !== c)
                if (b = this.an(b), this.Wi(a)) {
        var d = t.hb(a, c);
                d !== b && (ze(this, d, a), t.Ra(a, c, b), null === this.tf(b) && se(this, b, a), oe(this, "linkFromKey", vd, c, a, d, b), "string" === typeof c && this.Qb(a, c))
                } else
                t.Ra(a, c, b)
                }
        };
        t.g(P, "linkToKeyProperty", P.prototype.Zm);
        t.defineProperty(P, {Zm: "linkToKeyProperty"}, function() {
        return this.Aj
                }, function(a) {
        var b = this.Aj;
                b !== a && (pe(a, P, "linkToKeyProperty"), this.Aj = a, this.j("linkToKeyProperty", b, a))
                });
        P.prototype.getToKeyForLinkData = P.prototype.ll = function(a) {
        if (null !== a) {
        var b = this.Aj;
                if ("" !== b && (b = t.hb(a, b), void 0 !== b)) {
        if (qe(b))
                return b;
                t.m("ToKey value for link data " + a + " is not a number or a string: " + b)
                }
        }
        };
        P.prototype.setToKeyForLinkData = P.prototype.tx = function(a, b) {
        null === b && (b = void 0);
                void 0 === b || qe(b) || t.bc(b, "number or string", P, "setToKeyForLinkData:key");
                if (null !== a) {
        var c = this.Aj;
                if ("" !== c)
                if (b = this.an(b), this.Wi(a)) {
        var d = t.hb(a, c);
                d !== b && (ze(this, d, a), t.Ra(a, c, b), null === this.tf(b) && se(this, b, a), oe(this, "linkToKey", vd, c, a, d, b), "string" === typeof c && this.Qb(a, c))
                } else
                t.Ra(a, c, b)
                }
        };
        t.g(P, "linkFromPortIdProperty", P.prototype.up);
        t.defineProperty(P, {up: "linkFromPortIdProperty"}, function() {
        return this.nr
                }, function(a) {
        var b = this.nr;
                b !== a && (pe(a, P, "linkFromPortIdProperty"), this.nr = a, this.j("linkFromPortIdProperty", b, a))
                });
        P.prototype.getFromPortIdForLinkData = P.prototype.FI = function(a) {
        if (null === a)
                return"";
                var b = this.nr;
                if ("" === b)
                return"";
                a = t.hb(a, b);
                return void 0 === a ? "" : a
                };
        P.prototype.setFromPortIdForLinkData = P.prototype.aB = function(a, b) {
        t.i(b, "string", P, "setFromPortIdForLinkData:portname");
                if (null !== a) {
        var c = this.nr;
                if ("" !== c)
                if (this.Wi(a)) {
        var d = t.hb(a, c);
                void 0 === d && (d = "");
                d !== b && (t.Ra(a, c, b), oe(this, "linkFromPortId", vd, c, a, d, b), "string" === typeof c && this.Qb(a, c))
                } else
                t.Ra(a, c, b)
                }
        };
        t.g(P, "linkToPortIdProperty", P.prototype.yp);
        t.defineProperty(P, {yp: "linkToPortIdProperty"}, function() {
        return this.or
                }, function(a) {
        var b = this.or;
                b !== a && (pe(a, P, "linkToPortIdProperty"), this.or = a, this.j("linkToPortIdProperty", b, a))
                });
        P.prototype.getToPortIdForLinkData = P.prototype.II = function(a) {
        if (null === a)
                return"";
                var b = this.or;
                if ("" === b)
                return"";
                a = t.hb(a, b);
                return void 0 === a ? "" : a
                };
        P.prototype.setToPortIdForLinkData = P.prototype.dB = function(a, b) {
        t.i(b, "string", P, "setToPortIdForLinkData:portname");
                if (null !== a) {
        var c = this.or;
                if ("" !== c)
                if (this.Wi(a)) {
        var d = t.hb(a, c);
                void 0 === d && (d = "");
                d !== b && (t.Ra(a, c, b), oe(this, "linkToPortId", vd, c, a, d, b), "string" === typeof c && this.Qb(a, c))
                } else
                t.Ra(a, c, b)
                }
        };
        t.g(P, "nodeIsLinkLabelProperty", P.prototype.Bt);
        t.defineProperty(P, {Bt: "nodeIsLinkLabelProperty"}, function() {
        return this.mv
                }, function(a) {
        var b = this.mv;
                b !== a && (pe(a, P, "nodeIsLinkLabelProperty"), this.mv = a, this.j("nodeIsLinkLabelProperty", b, a))
                });
        P.prototype.isLinkLabelForNodeData = P.prototype.UI = function(a) {
        if (null === a)
                return!1;
                var b = this.mv;
                return"" === b ? !1 : t.hb(a, b) ? !0 : !1
                };
        t.g(P, "linkLabelKeysProperty", P.prototype.vp);
        t.defineProperty(P, {vp: "linkLabelKeysProperty"}, function() {
        return this.Jh
                }, function(a) {
        var b = this.Jh;
                b !== a && (pe(a, P, "linkLabelKeysProperty"), this.Jh = a, this.j("linkLabelKeysProperty", b, a))
                });
        P.prototype.getLabelKeysForLinkData = P.prototype.jl = function(a) {
        if (null === a)
                return t.ji;
                var b = this.Jh;
                if ("" === b)
                return t.ji;
                a = t.hb(a, b);
                return void 0 === a ? t.ji : a
                };
        P.prototype.setLabelKeysForLinkData = P.prototype.jG = function(a, b) {
        t.Rs(b, P, "setLabelKeysForLinkData:arr");
                if (null !== a) {
        var c = this.Jh;
                if ("" !== c)
                if (this.Wi(a)) {
        var d = t.hb(a, c);
                void 0 === d && (d = t.ji);
                if (d !== b) {
        for (var f = t.vb(d), g = 0; g < f; g++) {
        var h = t.mb(d, g);
                ze(this, h, a)
                }
        t.Ra(a, c, b);
                f = t.vb(b);
                for (g = 0; g < f; g++)
                h = t.mb(b, g), null === this.tf(h) && se(this, h, a);
                oe(this, "linkLabelKeys", vd, c, a, d, b);
                "string" === typeof c && this.Qb(a, c)
                }
        } else
                t.Ra(a, c, b)
                }
        };
        P.prototype.addLabelKeyForLinkData = P.prototype.GD = function(a, b) {
        if (null !== b && void 0 !== b && (qe(b) || t.bc(b, "number or string", P, "addLabelKeyForLinkData:key"), null !== a)) {
        var c = this.Jh;
                if ("" !== c) {
        var d = t.hb(a, c);
                void 0 === d ? this.jG(a, [b]) : t.isArray(d) ? 0 <= t.Pz(d, b) || (t.Si(d, Infinity, b), this.Wi(a) && (null === this.tf(b) && se(this, b, a), oe(this, "linkLabelKeys", wd, c, a, null, b))) : t.m(c + " property is not an Array; cannot addLabelKeyForLinkData: " + a)
                }
        }
        };
        P.prototype.removeLabelKeyForLinkData = P.prototype.FJ = function(a, b) {
        if (null !== b && void 0 !== b && (qe(b) || t.bc(b, "number or string", P, "removeLabelKeyForLinkData:key"), null !== a)) {
        var c = this.Jh;
                if ("" !== c) {
        var d = t.hb(a, c);
                if (t.isArray(d)) {
        var f = t.Pz(d, b);
                0 > f || (t.Ti(d, f), this.Wi(a) && (ze(this, b, a), oe(this, "linkLabelKeys", xd, c, a, b, null)))
                } else
                void 0 !== d && t.m(c + " property is not an Array; cannot removeLabelKeyforLinkData: " + a)
                }
        }
        };
        t.g(P, "linkDataArray", P.prototype.gj);
        t.defineProperty(P, {gj: "linkDataArray"}, function() {
        return this.Vg
                }, function(a) {
        var b = this.Vg;
                if (b !== a) {
        t.Rs(a, P, "linkDataArray");
                this.Wd && t.zc && (null !== b && t.Xm(b, "linkDataArray", this, !0), a = t.Xm(a, "linkDataArray", this, !1));
                for (var c = t.vb(a), d = 0; d < c; d++) {
        var f = t.mb(a, d);
                if (!t.rb(f)) {
        t.m("GraphLinksModel.linkDataArray must only contain Objects, not: " + f);
                return
                }
        t.it(f)
                }
        this.Vg = a;
                for (var g = new C(Object), d = 0; d < c; d++)
                f = t.mb(a, d), g.add(f);
                this.bm = g;
                oe(this, "linkDataArray", vd, "linkDataArray", this, b, a);
                for (d =
                        0; d < c; d++)
                f = t.mb(a, d), De(this, f)
                }
        });
        P.prototype.containsLinkData = P.prototype.Wi = function(a) {
        return null === a ? !1 : this.bm.contains(a)
                };
        P.prototype.addLinkData = P.prototype.Wv = function(a) {
        if (null !== a) {
        this.Wd && t.wf(a, this, !1);
                if (void 0 === t.od(a))
                t.Ac(a);
                else if (this.Wi(a))
                return;
                this.bm.add(a);
                var b = t.vb(this.Vg);
                t.Si(this.Vg, b, a);
                oe(this, "linkDataArray", wd, "linkDataArray", this, null, a, null, b);
                De(this, a)
                }
        };
        P.prototype.addLinkDataCollection = function(a) {
        if (t.isArray(a))
                for (var b = t.vb(a), c = 0; c < b; c++)
                this.Wv(t.mb(a, c));
                else
                for (a = a.k; a.next(); )
                this.Wv(a.value)
                };
        P.prototype.removeLinkData = P.prototype.VA = function(a) {
        if (null !== a) {
        this.Wd && t.wf(a, this, !0);
                this.bm.remove(a);
                var b = this.Vg.indexOf(a);
                if (!(0 > b)) {
        t.Ti(this.Vg, b);
                oe(this, "linkDataArray", xd, "linkDataArray", this, a, null, b, null);
                b = this.hl(a);
                ze(this, b, a);
                b = this.ll(a);
                ze(this, b, a);
                var c = this.jl(a);
                if (t.isArray(c))
                for (var d = t.vb(c), f = 0; f < d; f++)
                b = t.mb(c, f), ze(this, b, a)
                }
        }
        };
        P.prototype.removeLinkDataCollection = function(a) {
        if (t.isArray(a))
                for (var b = t.vb(a), c = 0; c < b; c++)
                this.VA(t.mb(a, c));
                else
                for (a = a.k; a.next(); )
                this.VA(a.value)
                };
        function De(a, b) {
        var c = a.hl(b), c = a.an(c);
                null === a.tf(c) && se(a, c, b);
                c = a.ll(b);
                c = a.an(c);
                null === a.tf(c) && se(a, c, b);
                var d = a.jl(b);
                if (t.isArray(d))
                for (var f = t.vb(d), g = 0; g < f; g++)
                c = t.mb(d, g), null === a.tf(c) && se(a, c, b)
        }
t.g(P, "copyLinkDataFunction", P.prototype.fI);
        t.defineProperty(P, {fI: "copyLinkDataFunction"}, function() {
        return this.su
                }, function(a) {
        var b = this.su;
                b !== a && (null !== a && t.i(a, "function", P, "copyLinkDataFunction"), this.su = a, this.j("copyLinkDataFunction", b, a))
                });
        P.prototype.copyLinkData = P.prototype.eE = function(a) {
        if (null === a)
                return null;
                var b = null, b = this.su;
                if (null !== b)
                b = b(a, this);
                else {
                var b = new a.constructor, c;
                        for (c in a) {
                var d = t.hb(a, c);
                        e && Ae(a, c, d);
                        t.Ra(b, c, d)
                        }
                this.Wd && t.wf(b, this, !1)
                        }
        b && (t.Ac(b), "" !== this.xj && t.Ra(b, this.xj, void 0), "" !== this.Aj && t.Ra(b, this.Aj, void 0), "" !== this.Jh && t.Ra(b, this.Jh, []));
                return b
                };
        t.g(P, "nodeIsGroupProperty", P.prototype.Hp);
        t.defineProperty(P, {Hp: "nodeIsGroupProperty"}, function() {
        return this.lv
                }, function(a) {
        var b = this.lv;
                b !== a && (pe(a, P, "nodeIsGroupProperty"), this.lv = a, this.j("nodeIsGroupProperty", b, a))
                });
        P.prototype.isGroupForNodeData = P.prototype.sA = function(a) {
        if (null === a)
                return!1;
                var b = this.lv;
                return"" === b ? !1 : t.hb(a, b) ? !0 : !1
                };
        t.g(P, "nodeGroupKeyProperty", P.prototype.dn);
        t.defineProperty(P, {dn: "nodeGroupKeyProperty"}, function() {
        return this.Hj
                }, function(a) {
        var b = this.Hj;
                b !== a && (pe(a, P, "nodeGroupKeyProperty"), this.Hj = a, this.j("nodeGroupKeyProperty", b, a))
                });
        t.g(P, "copiesGroupKeyOfNodeData", P.prototype.al);
        t.defineProperty(P, {al: "copiesGroupKeyOfNodeData"}, function() {
        return this.uy
                }, function(a) {
        this.uy !== a && (t.i(a, "boolean", P, "copiesGroupKeyOfNodeData"), this.uy = a)
                });
        P.prototype.getGroupKeyForNodeData = P.prototype.Rm = function(a) {
        if (null !== a) {
        var b = this.Hj;
                if ("" !== b && (b = t.hb(a, b), void 0 !== b)) {
        if (qe(b))
                return b;
                t.m("GroupKey value for node data " + a + " is not a number or a string: " + b)
                }
        }
        };
        P.prototype.setGroupKeyForNodeData = P.prototype.sx = function(a, b) {
        null === b && (b = void 0);
                void 0 === b || qe(b) || t.bc(b, "number or string", P, "setGroupKeyForNodeData:key");
                if (null !== a) {
        var c = this.Hj;
                if ("" !== c)
                if (this.le(a)) {
        var d = t.hb(a, c);
                d !== b && (ze(this, d, a), t.Ra(a, c, b), null === this.tf(b) && se(this, b, a), oe(this, "nodeGroupKey", vd, c, a, d, b), "string" === typeof c && this.Qb(a, c))
                } else
                t.Ra(a, c, b)
                }
        };
        P.prototype.copyNodeData = function(a) {
        if (null === a)
                return null;
                a = F.prototype.copyNodeData.call(this, a);
                this.al || "" === this.Hj || t.Ra(a, this.Hj, void 0);
                return a
                };
        P.prototype.setDataProperty = function(a, b, c) {
        e && (t.i(a, "object", P, "setDataProperty:data"), t.i(b, "string", P, "setDataProperty:propname"), "" === b && t.m("GraphLinksModel.setDataProperty: property name must not be an empty string when setting " + a + " to " + c));
                if (this.le(a))
                if (b === this.hj)
                this.bB(a, c);
                else {
                if (b === this.ql) {
                this.ox(a, c);
                        return
                        }
                if (b === this.dn) {
                this.sx(a, c);
                        return
                        }
                b === this.Hp && t.m("GraphLinksModel.setDataProperty: property name must not be the nodeIsGroupProperty: " + b)
                        }
        else if (this.Wi(a)) {
        if (b ===
                this.Ym) {
        this.qx(a, c);
                return
                }
        if (b === this.Zm) {
        this.tx(a, c);
                return
                }
        if (b === this.up) {
        this.aB(a, c);
                return
                }
        if (b === this.yp) {
        this.dB(a, c);
                return
                }
        if (b === this.tp) {
        this.iG(a, c);
                return
                }
        if (b === this.vp) {
        this.jG(a, c);
                return
                }
        } else
                !t.Yp && a instanceof Q && (t.Yp = !0, t.trace('GraphLinksModel.setDataProperty is modifying a GraphObject, "' + a.toString() + '"'), t.trace("  Is that really your intent?"));
                var d = t.hb(a, b);
                d !== c && (t.Ra(a, b, c), this.ix(a, b, d, c))
                };
        aa = P.prototype;
        aa.Ht = function(a, b) {
        F.prototype.Ht.call(this, a, b);
                for (var c = this.Bc.k; c.next(); )
                this.XA(c.value, a, b);
                for (c = this.bm.k; c.next(); ) {
        var d = c.value, f = a, g = b;
                if (this.hl(d) === f) {
        var h = this.xj;
                t.Ra(d, h, g);
                oe(this, "linkFromKey", vd, h, d, f, g);
                "string" === typeof h && this.Qb(d, h)
                }
        this.ll(d) === f && (h = this.Aj, t.Ra(d, h, g), oe(this, "linkToKey", vd, h, d, f, g), "string" === typeof h && this.Qb(d, h));
                var k = this.jl(d);
                if (t.isArray(k))
                for (var l = t.vb(k), h = this.Jh, m = 0; m < l; m++)
                t.mb(k, m) === f && (t.MD(k, m, g), oe(this, "linkLabelKeys", wd, h, d,
                f, g))
                }
        };
        aa.XA = function(a, b, c) {
        if (this.Rm(a) === b) {
        var d = this.Hj;
                t.Ra(a, d, c);
                oe(this, "nodeGroupKey", vd, d, a, b, c);
                "string" === typeof d && this.Qb(a, d)
                }
        };
        aa.nB = function() {
        F.prototype.nB.call(this);
                for (var a = this.gj, b = t.vb(a), c = 0; c < b; c++) {
        var d = t.mb(a, c);
                De(this, d)
                }
        };
        aa.Lp = function(a) {
        F.prototype.Lp.call(this, a);
                a = this.Hb(a);
                var b = re(this, a);
                if (null !== b) {
        for (var c = new B(Object), b = b.k; b.next(); ) {
        var d = b.value;
                if (this.le(d)) {
        if (this.Rm(d) === a) {
        var f = this.Hj;
                oe(this, "nodeGroupKey", vd, f, d, a, a);
                "string" === typeof f && this.Qb(d, f);
                c.add(d)
                }
        } else {
        this.hl(d) === a && (f = this.xj, oe(this, "linkFromKey", vd, f, d, a, a), "string" === typeof f && this.Qb(d, f), c.add(d));
                this.ll(d) === a && (f = this.Aj, oe(this, "linkToKey", vd, f, d, a, a), "string" === typeof f && this.Qb(d, f), c.add(d));
                var g = this.jl(d);
                if (t.isArray(g))
                for (var h = t.vb(g), f = this.Jh, k = 0; k < h; k++)
                t.mb(g, k) === a && (oe(this, "linkLabelKeys", wd, f, d, a, a), c.add(d))
                }
        }
        for (c = c.k; c.next(); )
                ze(this, a, c.value)
                }
        };
        aa.Kp = function(a) {
        F.prototype.Kp.call(this, a);
                var b = this.Rm(a);
                null === this.tf(b) && se(this, b, a)
                };
        aa.Wt = function(a) {
        F.prototype.Wt.call(this, a);
                var b = this.Rm(a);
                ze(this, b, a)
                };
        t.g(P, "linkCategoryProperty", P.prototype.tp);
        t.defineProperty(P, {tp: "linkCategoryProperty"}, function() {
        return this.kr
                }, function(a) {
        var b = this.kr;
                b !== a && (pe(a, P, "linkCategoryProperty"), this.kr = a, this.j("linkCategoryProperty", b, a))
                });
        P.prototype.getCategoryForLinkData = P.prototype.getCategoryForLinkData = function(a) {
        if (null === a)
                return"";
                var b = this.kr;
                if ("" === b)
                return"";
                b = t.hb(a, b);
                if (void 0 === b)
                return"";
                if ("string" === typeof b)
                return b;
                t.m("getCategoryForLinkData found a non-string category for " + a + ": " + b);
                return""
                };
        P.prototype.setCategoryForLinkData = P.prototype.iG = function(a, b) {
        t.i(b, "string", P, "setCategoryForLinkData:cat");
                if (null !== a) {
        var c = this.kr;
                if ("" === c)
                return"";
                if (this.Wi(a)) {
        var d = t.hb(a, c);
                void 0 === d && (d = "");
                d !== b && (t.Ra(a, c, b), oe(this, "linkCategory", vd, c, a, d, b), "string" === typeof c && this.Qb(a, c))
                } else
                t.Ra(a, c, b)
                }
        };
        function Ld(a) {
        1 < arguments.length && t.m("TreeModel constructor can only take one optional argument, the Array of node data.");
                F.call(this);
                this.Ij = "parent";
                this.vy = !1;
                this.Kr = "parentLinkCategory";
                void 0 !== a && (this.Eg = a)
        }
t.ga("TreeModel", Ld);
        t.Ka(Ld, F);
        Ld.prototype.toString = function(a) {
        void 0 === a && (a = 0);
                if (2 <= a)
                return this.jB();
                var b = ("" !== this.name ? this.name : "") + " TreeModel";
                if (0 < a) {
        b += "\n node data:";
                a = this.Eg;
                var c = t.vb(a), d;
                for (d = 0; d < c; d++)
                var f = t.mb(a, d), b = b + (" " + this.Hb(f) + ":" + yd(f))
                }
        return b
                };
        Ld.prototype.Xt = function() {
        var a = F.prototype.Xt.call(this), b = "";
                "parent" !== this.en && "string" === typeof this.en && (b += ',\n  "nodeParentKeyProperty": ' + this.quote(this.en));
                return a + b
                };
        Ld.prototype.Gt = function(a) {
        F.prototype.Gt.call(this, a);
                a.nodeParentKeyProperty && (this.en = a.nodeParentKeyProperty)
                };
        Ld.prototype.an = function(a) {
        return a
                };
        t.g(Ld, "nodeParentKeyProperty", Ld.prototype.en);
        t.defineProperty(Ld, {en: "nodeParentKeyProperty"}, function() {
        return this.Ij
                }, function(a) {
        var b = this.Ij;
                b !== a && (pe(a, Ld, "nodeParentKeyProperty"), this.Ij = a, this.j("nodeParentKeyProperty", b, a))
                });
        t.g(Ld, "copiesParentKeyOfNodeData", Ld.prototype.bl);
        t.defineProperty(Ld, {bl: "copiesParentKeyOfNodeData"}, function() {
        return this.vy
                }, function(a) {
        this.vy !== a && (t.i(a, "boolean", Ld, "copiesParentKeyOfNodeData"), this.vy = a)
                });
        Ld.prototype.getParentKeyForNodeData = Ld.prototype.Sm = function(a) {
        if (null !== a) {
        var b = this.Ij;
                if ("" !== b && (b = t.hb(a, b), void 0 !== b)) {
        if (qe(b))
                return b;
                t.m("ParentKey value for node data " + a + " is not a number or a string: " + b)
                }
        }
        };
        Ld.prototype.setParentKeyForNodeData = Ld.prototype.lh = function(a, b) {
        null === b && (b = void 0);
                void 0 === b || qe(b) || t.bc(b, "number or string", Ld, "setParentKeyForNodeData:key");
                if (null !== a) {
        var c = this.Ij;
                if ("" !== c)
                if (b = this.an(b), this.le(a)) {
        var d = t.hb(a, c);
                d !== b && (ze(this, d, a), t.Ra(a, c, b), null === this.tf(b) && se(this, b, a), oe(this, "nodeParentKey", vd, c, a, d, b), "string" === typeof c && this.Qb(a, c))
                } else
                t.Ra(a, c, b)
                }
        };
        t.g(Ld, "parentLinkCategoryProperty", Ld.prototype.zJ);
        t.defineProperty(Ld, {zJ: "parentLinkCategoryProperty"}, function() {
        return this.Kr
                }, function(a) {
        var b = this.Kr;
                b !== a && (pe(a, Ld, "parentLinkCategoryProperty"), this.Kr = a, this.j("parentLinkCategoryProperty", b, a))
                });
        Ld.prototype.getParentLinkCategoryForNodeData = Ld.prototype.HI = function(a) {
        if (null === a)
                return"";
                var b = this.Kr;
                if ("" === b)
                return"";
                b = t.hb(a, b);
                if (void 0 === b)
                return"";
                if ("string" === typeof b)
                return b;
                t.m("getParentLinkCategoryForNodeData found a non-string category for " + a + ": " + b);
                return""
                };
        Ld.prototype.setParentLinkCategoryForNodeData = Ld.prototype.LJ = function(a, b) {
        t.i(b, "string", Ld, "setParentLinkCategoryForNodeData:cat");
                if (null !== a) {
        var c = this.Kr;
                if ("" === c)
                return"";
                if (this.le(a)) {
        var d = t.hb(a, c);
                void 0 === d && (d = "");
                d !== b && (t.Ra(a, c, b), oe(this, "parentLinkCategory", vd, c, a, d, b), "string" === typeof c && this.Qb(a, c))
                } else
                t.Ra(a, c, b)
                }
        };
        Ld.prototype.copyNodeData = function(a) {
        if (null === a)
                return null;
                a = F.prototype.copyNodeData.call(this, a);
                this.bl || "" === this.Ij || t.Ra(a, this.Ij, void 0);
                return a
                };
        Ld.prototype.setDataProperty = function(a, b, c) {
        e && (t.i(a, "object", Ld, "setDataProperty:data"), t.i(b, "string", Ld, "setDataProperty:propname"), "" === b && t.m("TreeModel.setDataProperty: property name must not be an empty string when setting " + a + " to " + c));
                if (this.le(a))
                if (b === this.hj)
                this.bB(a, c);
                else {
                if (b === this.ql) {
                this.ox(a, c);
                        return
                        }
                if (b === this.en) {
                this.lh(a, c);
                        return
                        }
                }
        else
                !t.Yp && a instanceof Q && (t.Yp = !0, t.trace('TreeModel.setDataProperty is modifying a GraphObject, "' + a.toString() + '"'), t.trace("  Is that really your intent?"));
                var d = t.hb(a, b);
                d !== c && (t.Ra(a, b, c), this.ix(a, b, d, c))
                };
        aa = Ld.prototype;
        aa.Ht = function(a, b) {
        F.prototype.Ht.call(this, a, b);
                for (var c = this.Bc.k; c.next(); )
                this.XA(c.value, a, b)
                };
        aa.XA = function(a, b, c) {
        if (this.Sm(a) === b) {
        var d = this.Ij;
                t.Ra(a, d, c);
                oe(this, "nodeParentKey", vd, d, a, b, c);
                "string" === typeof d && this.Qb(a, d)
                }
        };
        aa.Lp = function(a) {
        F.prototype.Lp.call(this, a);
                a = this.Hb(a);
                var b = re(this, a);
                if (null !== b) {
        for (var c = new B(Object), b = b.k; b.next(); ) {
        var d = b.value;
                if (this.le(d) && this.Sm(d) === a) {
        var f = this.Ij;
                oe(this, "nodeParentKey", vd, f, d, a, a);
                "string" === typeof f && this.Qb(d, f);
                c.add(d)
                }
        }
        for (c = c.k; c.next(); )
                ze(this, a, c.value)
                }
        };
        aa.Kp = function(a) {
        F.prototype.Kp.call(this, a);
                var b = this.Sm(a), b = this.an(b);
                null === this.tf(b) && se(this, b, a)
                };
        aa.Wt = function(a) {
        F.prototype.Wt.call(this, a);
                var b = this.Sm(a);
                ze(this, b, a)
                };
        function Ee(a, b, c) {
        t.Ac(this);
                void 0 === a ? a = "" : t.i(a, "string", Ee, "constructor:targetprop");
                void 0 === b ? b = a : t.i(b, "string", Ee, "constructor:sourceprop");
                void 0 === c ? c = null : null !== c && t.i(c, "function", Ee, "constructor:conv");
                this.kD = "";
                this.mg = null;
                this.Ov = a;
                this.Mv = this.wz = 0;
                this.fD = null;
                this.Hv = b;
                this.qy = c;
                this.ez = Fe;
                this.jy = null
        }
t.ga("Binding", Ee);
        var Fe;
        Ee.OneWay = Fe = t.w(Ee, "OneWay", 1);
        var Ge;
        Ee.TwoWay = Ge = t.w(Ee, "TwoWay", 2);
        Ee.parseEnum = function(a, b) {
        t.i(a, "function", Ee, "parseEnum:ctor");
                t.Aa(b, a, Ee, "parseEnum:defval");
                return function(c) {
                return t.Om(a, c) || b
                        }
        };
        var yd;
        Ee.toString = yd = function(a) {
        var b = a;
                t.rb(a) && (a.text ? b = a.text : a.name ? b = a.name : void 0 !== a.key ? b = a.key : void 0 !== a.id ? b = a.id : a.constructor === Object && (a.Text ? b = a.Text : a.Name ? b = a.Name : void 0 !== a.Key ? b = a.Key : void 0 !== a.Id ? b = a.Id : void 0 !== a.ID && (b = a.ID)));
                return void 0 === b ? "undefined" : null === b ? "null" : b.toString()
                };
        Ee.prototype.toString = function() {
        return"Binding(" + this.nn + " " + this.Tt + ":" + this.fB + ")"
                };
        Ee.prototype.freeze = function() {
        this.ob = !0;
                return this
                };
        Ee.prototype.La = function() {
        this.ob = !1;
                return this
                };
        t.g(Ee, "targetId", Ee.prototype.nn);
        t.defineProperty(Ee, {nn: null}, function() {
        return this.kD
                }, function(a) {
        t.L(this);
                t.i(a, "string", Ee, "targetId");
                this.kD = a
                });
        t.g(Ee, "targetProperty", Ee.prototype.Tt);
        t.defineProperty(Ee, {Tt: "targetProperty"}, function() {
        return this.Ov
                }, function(a) {
        t.L(this);
                t.i(a, "string", Ee, "targetProperty");
                this.Ov = a
                });
        t.g(Ee, "sourceName", Ee.prototype.Rt);
        t.defineProperty(Ee, {Rt: "sourceName"}, function() {
        return this.fD
                }, function(a) {
        t.L(this);
                t.i(a, "string", Ee, "sourceName");
                this.fD = a
                });
        t.g(Ee, "sourceProperty", Ee.prototype.fB);
        t.defineProperty(Ee, {fB: "sourceProperty"}, function() {
        return this.Hv
                }, function(a) {
        t.L(this);
                t.i(a, "string", Ee, "sourceProperty");
                this.Hv = a
                });
        t.g(Ee, "converter", Ee.prototype.bE);
        t.defineProperty(Ee, {bE: "converter"}, function() {
        return this.qy
                }, function(a) {
        t.L(this);
                null !== a && t.i(a, "function", Ee, "converter");
                this.qy = a
                });
        t.g(Ee, "backConverter", Ee.prototype.QD);
        t.defineProperty(Ee, {QD: "backConverter"}, function() {
        return this.jy
                }, function(a) {
        t.L(this);
                null !== a && t.i(a, "function", Ee, "backConverter");
                this.jy = a
                });
        t.g(Ee, "mode", Ee.prototype.mode);
        t.defineProperty(Ee, {mode: "mode"}, function() {
        return this.ez
                }, function(a) {
        t.L(this);
                t.Aa(a, Ee, Ee, "mode");
                this.ez = a
                });
        Ee.prototype.makeTwoWay = function(a) {
        void 0 === a && (a = null);
                null !== a && t.i(a, "function", Ee, "makeTwoWay");
                this.mode = Ge;
                this.QD = a;
                return this
                };
        Ee.prototype.ofObject = Ee.prototype.KA = function(a) {
        void 0 === a && (a = "");
                e && t.i(a, "string", Ee, "ofObject:srcname");
                this.Rt = a;
                return this
                };
        Ee.prototype.updateTarget = Ee.prototype.MG = function(a, b, c) {
        var d = this.Hv;
                if (!c || d === c) {
        c = this.Ov;
                var f = this.qy;
                if (null === f && "" === c)
                t.trace("Binding error: target property is the empty string: " + this.toString());
                else {
                e && "string" === typeof c && ("function" !== typeof a.setAttribute && 0 < c.length && "_" !== c[0] && !t.Gw(a, c) ? t.trace("Binding error: undefined target property: " + c + " on " + a.toString()) : "name" === c && a instanceof Q && t.trace("Binding error: cannot modify GraphObject.name on " + a.toString()));
                        var g = b;
                        "" !==
                        d && (g = t.hb(b, d));
                        if (void 0 !== g)
                        if (null === f)
                        "" !== c && t.Ra(a, c, g);
                        else
                        try {
                        if ("" !== c) {
                        var h = f(g, a);
                                e && void 0 === h && t.trace('Binding warning: conversion function returned undefined when setting target property "' + c + '" on ' + a.toString() + ", function is: " + f);
                                t.Ra(a, c, h)
                                } else
                                f(g, a)
                                } catch (k) {
                e && t.trace("Binding error: " + k.toString() + ' setting target property "' + c + '" on ' + a.toString() + " with conversion function: " + f)
                        }
                }
        }
        };
        Ee.prototype.updateSource = Ee.prototype.oB = function(a, b, c, d) {
        if (this.ez === Ge) {
        var f = this.Ov;
                if (!c || f === c) {
        c = this.Hv;
                var g = this.jy;
                if (null !== g || "" !== c) {
        var h = a;
                "" !== f && (h = t.hb(a, f));
                if (void 0 !== h)
                if (null === g)
                d && d.ba ? (e && d.ba.hj === c && d.ba.le(b) && t.trace("Binding error: cannot have TwoWay Binding on node data key property: " + this.toString()), d.ba.setDataProperty(b, c, h)) : t.Ra(b, c, h);
                else
                try {
                if ("" !== c) {
                var k = g(h, b);
                        d && d.ba ? (e && (d.ba.hj === c && d.ba.le(b) && t.trace("Binding error: cannot have TwoWay Binding on node data key property: " +
                                this.toString()), void 0 === k && t.trace('Binding warning: conversion function returned undefined when setting source property "' + c + '" on ' + b.toString() + ", function is: " + g)), d.ba.setDataProperty(b, c, k)) : t.Ra(b, c, k)
                        } else
                        g(h, b)
                        } catch (l) {
        e && t.trace("Binding error: " + l.toString() + ' setting source property "' + c + '" on ' + b.toString() + " with conversion function: " + g)
                }
        }
        }
        }
        };
        function de() {
        this.gH = (new B(td)).freeze();
                this.Yb = "";
                this.nC = !1
        }
t.ga("Transaction", de);
        de.prototype.toString = function(a) {
        var b = "Transaction: " + this.name + " " + this.ah.count.toString() + (this.np ? "" : ", incomplete");
                if (void 0 !== a && 0 < a)
                for (var c = this.ah.count, d = 0; d < c; d++) {
        var f = this.ah.wa(d);
                null !== f && (b += "\n  " + f.toString(a - 1))
                }
        return b
                };
        de.prototype.clear = de.prototype.clear = function() {
        var a = this.ah;
                a.La();
                for (var b = a.count - 1; 0 <= b; b--) {
        var c = a.wa(b);
                null !== c && c.clear()
                }
        a.clear();
                a.freeze()
                };
        de.prototype.canUndo = de.prototype.canUndo = function() {
        return this.np
                };
        de.prototype.undo = de.prototype.undo = function() {
        if (this.canUndo())
                for (var a = this.ah.count - 1; 0 <= a; a--) {
        var b = this.ah.wa(a);
                null !== b && b.undo()
                }
        };
        de.prototype.canRedo = de.prototype.canRedo = function() {
        return this.np
                };
        de.prototype.redo = de.prototype.redo = function() {
        if (this.canRedo())
                for (var a = this.ah.count, b = 0; b < a; b++) {
        var c = this.ah.wa(b);
                null !== c && c.redo()
                }
        };
        t.A(de, {ah: "changes"}, function() {
        return this.gH
                });
        t.g(de, "name", de.prototype.name);
        t.defineProperty(de, {name: "name"}, function() {
        return this.Yb
                }, function(a) {
        this.Yb = a
                });
        t.g(de, "isComplete", de.prototype.np);
        t.defineProperty(de, {np: "isComplete"}, function() {
        return this.nC
                }, function(a) {
        this.nC = a
                });
        function zd() {
        this.gz = new C(F);
                this.Le = !1;
                this.mH = (new B(de)).freeze();
                this.Sg = - 1;
                this.CC = 999;
                this.xi = !1;
                this.yu = null;
                this.Uk = 0;
                this.ky = !1;
                e && (this.ky = !0);
                this.Yg = (new B("string")).freeze();
                this.so = new B("number");
                this.Oy = !0;
                this.az = !1
        }
t.ga("UndoManager", zd);
        zd.prototype.toString = function(a) {
        for (var b = "UndoManager " + this.bj + "<" + this.history.count + "<=" + this.BA, b = b + "[", c = this.DF.count, d = 0; d < c; d++)
                0 < d && (b += " "), b += this.DF.wa(d);
                b += "]";
                if (void 0 !== a && 0 < a)
                for (c = this.history.count, d = 0; d < c; d++)
                b += "\n " + this.history.wa(d).toString(a - 1);
                return b
                };
        zd.prototype.clear = zd.prototype.clear = function() {
        var a = this.history;
                a.La();
                for (var b = a.count - 1; 0 <= b; b--) {
        var c = a.wa(b);
                null !== c && c.clear()
                }
        a.clear();
                this.Sg = - 1;
                a.freeze();
                this.xi = !1;
                this.yu = null;
                this.Uk = 0;
                this.Yg.La();
                this.Yg.clear();
                this.Yg.freeze();
                this.so.clear()
                };
        zd.prototype.addModel = zd.prototype.CH = function(a) {
        this.gz.add(a)
                };
        zd.prototype.removeModel = zd.prototype.GJ = function(a) {
        this.gz.remove(a)
                };
        zd.prototype.startTransaction = zd.prototype.tc = function(a) {
        void 0 === a && (a = "");
                null === a && (a = "");
                if (this.sb)
                return!1;
                !0 === this.Oy && (this.Oy = !1, this.Uk++, this.Uc("StartingFirstTransaction", a, this.Xi), 0 < this.Uk && this.Uk--);
                this.isEnabled && (this.Yg.La(), this.Yg.add(a), this.Yg.freeze(), null === this.Xi ? this.so.add(0) : this.so.add(this.Xi.ah.count));
                this.Uk++;
                var b = 1 === this.Je;
                b && this.Uc("StartedTransaction", a, this.Xi);
                return b
                };
        zd.prototype.commitTransaction = zd.prototype.Ce = function(a) {
        return He(this, !0, a)
                };
        zd.prototype.rollbackTransaction = zd.prototype.Mp = function() {
        return He(this, !1, "")
                };
        function He(a, b, c) {
        if (a.sb)
                return!1;
                a.Tz && 1 > a.Je && t.trace("Ending transaction without having started a transaction: " + c);
                var d = 1 === a.Je;
                d && b && a.isEnabled && a.Uc("CommittingTransaction", c, a.Xi);
                var f = 0;
                if (0 < a.Je && (a.Uk--, a.isEnabled)) {
        var g = a.Yg.count;
                0 < g && ("" === c && (c = a.Yg.wa(0)), a.Yg.La(), a.Yg.qd(g - 1), a.Yg.freeze());
                g = a.so.count;
                0 < g && (f = a.so.wa(g - 1), a.so.qd(g - 1))
        }
        g = a.Xi;
                if (d) {
        if (b) {
        a.az = !1;
                if (a.isEnabled && null !== g) {
        b = g;
                b.np = !0;
                b.name = c;
                d = a.history;
                d.La();
                for (f = d.count - 1; f > a.bj; f--)
                g = d.wa(f), null !==
                g && g.clear(), d.qd(f), a.az = !0;
                f = a.BA;
                0 === f && (f = 1);
                0 < f && d.count >= f && (g = d.wa(0), null !== g && g.clear(), d.qd(0), a.Sg--);
                d.add(b);
                a.Sg++;
                d.freeze();
                g = b
        }
        a.Uc("CommittedTransaction", c, g)
        } else {
        a.xi = !0;
                try {
                a.isEnabled && null !== g && (g.np = !0, g.undo())
                } finally {
        a.Uc("RolledBackTransaction", c, g), a.xi = !1
        }
        null !== g && g.clear()
        }
        a.yu = null;
                return!0
        }
        if (a.isEnabled && !b && null !== g) {
        a = f;
                c = g.ah;
                for (b = c.count - 1; b >= a; b--)
                d = c.wa(b), null !== d && d.undo(), c.La(), c.qd(b);
                c.freeze()
        }
        return!1
        }
zd.prototype.canUndo = zd.prototype.canUndo = function() {
if (!this.isEnabled || 0 < this.Je || this.sb)
        return!1;
        var a = this.EG;
        return null !== a && a.canUndo() ? !0 : !1
        };
        zd.prototype.undo = zd.prototype.undo = function() {
        if (this.canUndo()) {
        var a = this.EG;
                try {
                this.Uc("StartingUndo", "Undo", a), this.xi = !0, this.Sg--, a.undo()
                        } catch (b) {
        t.trace("undo error: " + b.toString())
                } finally {
        this.xi = !1, this.Uc("FinishedUndo", "Undo", a)
                }
        }
        };
        zd.prototype.canRedo = zd.prototype.canRedo = function() {
        if (!this.isEnabled || 0 < this.Je || this.sb)
                return!1;
                var a = this.DG;
                return null !== a && a.canRedo() ? !0 : !1
                };
        zd.prototype.redo = zd.prototype.redo = function() {
        if (this.canRedo()) {
        var a = this.DG;
                try {
                this.Uc("StartingRedo", "Redo", a), this.xi = !0, this.Sg++, a.redo()
                        } catch (b) {
        t.trace("redo error: " + b.toString())
                } finally {
        this.xi = !1, this.Uc("FinishedRedo", "Redo", a)
                }
        }
        };
        zd.prototype.Uc = function(a, b, c) {
        void 0 === c && (c = null);
                var d = new td;
                d.td = ud;
                d.propertyName = a;
                d.object = c;
                d.oldValue = b;
                for (a = this.nJ; a.next(); )
                b = a.value, d.ba = b, b.dw(d)
                };
        zd.prototype.handleChanged = zd.prototype.OE = function(a) {
        if (this.isEnabled && !this.sb && !this.skipsEvent(a)) {
        var b = this.Xi;
                null === b && (this.yu = b = new de);
                var c = a.copy(), b = b.ah;
                b.La();
                b.add(c);
                b.freeze();
                this.Tz && 0 >= this.Je && !this.Oy && (a = a.h, null !== a && !1 === a.kf || t.trace("Change not within a transaction: " + c.toString()))
                }
        };
        zd.prototype.skipsEvent = function(a) {
        if (null === a || 0 > a.td.value)
                return!0;
                a = a.object;
                if (a instanceof Q) {
        if (a = a.layer, null !== a && a.yc)
                return!0
                } else if (a instanceof ae && a.yc)
                return!0;
                return!1
                };
        t.A(zd, {nJ: "models"}, function() {
        return this.gz.k
                });
        t.g(zd, "isEnabled", zd.prototype.isEnabled);
        t.defineProperty(zd, {isEnabled: "isEnabled"}, function() {
        return this.Le
                }, function(a) {
        this.Le = a
                });
        t.A(zd, {EG: "transactionToUndo"}, function() {
        return 0 <= this.bj && this.bj <= this.history.count - 1 ? this.history.wa(this.bj) : null
                });
        t.A(zd, {DG: "transactionToRedo"}, function() {
        return this.bj < this.history.count - 1 ? this.history.wa(this.bj + 1) : null
                });
        t.A(zd, {sb: "isUndoingRedoing"}, function() {
        return this.xi
                });
        t.A(zd, {history: "history"}, function() {
        return this.mH
                });
        t.g(zd, "maxHistoryLength", zd.prototype.BA);
        t.defineProperty(zd, {BA: "maxHistoryLength"}, function() {
        return this.CC
                }, function(a) {
        this.CC = a
                });
        t.A(zd, {bj: "historyIndex"}, function() {
        return this.Sg
                });
        t.A(zd, {Xi: "currentTransaction"}, function() {
        return this.yu
                });
        t.A(zd, {Je: "transactionLevel"}, function() {
        return this.Uk
                });
        t.A(zd, {cF: "isInTransaction"}, function() {
        return 0 < this.Uk
                });
        t.defineProperty(zd, {Tz: "checksTransactionLevel"}, function() {
        return this.ky
                }, function(a) {
        this.ky = a
                });
        t.A(zd, {DF: "nestedTransactionNames"}, function() {
        return this.Yg
                });
        function oa() {
        0 < arguments.length && t.$c(oa);
                t.Ac(this);
                this.U = null;
                this.NB = this.OB = this.ZB = this.PB = !1;
                this.Nk = this.gy = null;
                this.CD = 1.05;
                this.XB = 1;
                this.bz = NaN;
                this.zC = null;
                this.DD = NaN
        }
t.ga("CommandHandler", oa);
        oa.prototype.toString = function() {
        return"CommandHandler"
                };
        t.A(oa, {h: "diagram"}, function() {
        return this.U
                });
        oa.prototype.wd = function(a) {
        e && null !== a && t.l(a, z, oa, "setDiagram");
                this.U = a
                };
        oa.prototype.doKeyDown = function() {
        var a = this.h;
                if (null !== a) {
        var b = a.R, c = t.Um ? b.Ap : b.control, d = b.shift, f = b.alt, g = b.key;
                !c || "C" !== g && "Insert" !== g ? c && "X" === g || d && "Del" === g ? this.canCutSelection() && this.cutSelection() : "Del" === g ? this.canDeleteSelection() && this.deleteSelection() : c && "V" === g || d && "Insert" === g ? this.canPasteSelection() && this.pasteSelection() : c && "Y" === g || f && d && "Backspace" === g ? this.canRedo() && this.redo() : c && "Z" === g || f && "Backspace" === g ? this.canUndo() && this.undo() : c && "A" === g ? this.canSelectAll() &&
                this.selectAll() : "Esc" === g ? this.canStopCommand() && this.stopCommand() : "Up" === g ? a.of && (c ? a.scroll("pixel", "up") : a.scroll("line", "up")) : "Down" === g ? a.of && (c ? a.scroll("pixel", "down") : a.scroll("line", "down")) : "Left" === g ? a.nf && (c ? a.scroll("pixel", "left") : a.scroll("line", "left")) : "Right" === g ? a.nf && (c ? a.scroll("pixel", "right") : a.scroll("line", "right")) : "PageUp" === g ? d && a.nf ? a.scroll("page", "left") : a.of && a.scroll("page", "up") : "PageDown" === g ? d && a.nf ? a.scroll("page", "right") : a.of && a.scroll("page", "down") : "Home" ===
                g ? (b = a.Ed, c && a.of ? a.position = new w(a.position.x, b.y) : !c && a.nf && (a.position = new w(b.x, a.position.y))) : "End" === g ? (b = a.Ed, d = a.xb, c && a.of ? a.position = new w(d.x, b.bottom - d.height) : !c && a.nf && (a.position = new w(b.right - d.width, d.y))) : "Subtract" === g ? this.canDecreaseZoom() && this.decreaseZoom() : "Add" === g ? this.canIncreaseZoom() && this.increaseZoom() : c && "0" === g ? this.canResetZoom() && this.resetZoom() : d && "Z" === g ? this.canZoomToFit() && this.zoomToFit() : c && !d && "G" === g ? this.canGroupSelection() && this.groupSelection() : c &&
                d && "G" === g ? this.canUngroupSelection() && this.ungroupSelection() : b.event && 113 === b.event.which ? this.canEditTextBlock() && this.editTextBlock() : b.event && 93 === b.event.which ? this.canShowContextMenu() && this.showContextMenu() : b.bubbles = !0 : this.canCopySelection() && this.copySelection()
                }
        };
        oa.prototype.doKeyUp = function() {
        var a = this.h;
                null !== a && (a.R.bubbles = !0)
                };
        oa.prototype.stopCommand = function() {
        var a = this.h;
                if (null !== a) {
        var b = a.Ua;
                b instanceof Ie && a.Pe && a.fw();
                null !== b && b.doCancel()
                }
        };
        oa.prototype.canStopCommand = function() {
        return!0
                };
        oa.prototype.selectAll = function() {
        var a = this.h;
                if (null !== a) {
        a.ka();
                try {
                a.$b = "wait";
                        a.Ba("ChangingSelection");
                        for (var b = a.rl; b.next(); )
                        b.value.eb = !0;
                        for (b = a.jh; b.next(); )
                        b.value.eb = !0;
                        for (b = a.links; b.next(); )
                        b.value.eb = !0
                        } finally {
        a.Ba("ChangedSelection"), a.$b = ""
                }
        }
        };
        oa.prototype.canSelectAll = function() {
        var a = this.h;
                return null !== a && a.Pe
                };
        oa.prototype.deleteSelection = function() {
        var a = this.h;
                if (null !== a && !a.Ba("SelectionDeleting", a.selection))
                try {
                a.$b = "wait";
                        a.tc("Delete");
                        a.Ba("ChangingSelection");
                        for (var b = new C(E), c = a.selection.k; c.next(); )
                        Je(b, c.value, !0, this.sE ? Infinity : 0, function(a) {
                        return a.canDelete()
                                });
                        a.WA(b, !0);
                        a.Ba("SelectionDeleted", b)
                        } finally {
        a.Ba("ChangedSelection"), a.Ce("Delete"), a.$b = ""
                }
        };
        oa.prototype.canDeleteSelection = function() {
        var a = this.h;
                return null === a || a.ab || a.Ze || !a.Yk || 0 === a.selection.count ? !1 : !0
                };
        function Je(a, b, c, d, f) {
        if (!(a.contains(b) || (void 0 === f && (f = null), null !== f && !f(b) || b instanceof Ke)))
                if (a.add(b), b instanceof S) {
        if (c && b instanceof T)
                for (var g = b.Xc; g.next(); ) {
        var h = g.value;
                Je(a, h, c, d, f)
        }
        for (h = b.re; h.next(); )
                if (g = h.value, !a.contains(g)) {
        var k = g.aa, l = g.ca;
                null !== k && a.contains(k) && null !== l && a.contains(l) ? Je(a, g, c, d, f) : null !== k && null !== l || Je(a, g, c, d, f)
        }
        if (1 < d)
                for (b = b.BE(); b.next(); )
                h = b.value, Je(a, h, c, d - 1, f)
        } else if (b instanceof V)
                for (h = b.ek; h.next(); )
                Je(a, h.value, c, d, f)
        }
oa.prototype.Im = function(a, b, c) {
var d = new ja(E, E);
        for (a = a.k; a.next(); ) {
var f = a.value;
        Le(this, f, b, d, c)
        }
if (null !== b) {
c = b.ba;
        a = !1;
        null !== b.wb.Fd && (a = b.wb.Fd.Zh);
        for (var g = new C(V), h = new ja(V, V), k = d.k; k.next(); )
        if (f = k.value, f instanceof V)
        a || null !== f.aa && null !== f.ca || g.add(f);
        else if (c instanceof Ld && f instanceof S && null !== f.data) {
var l = f, f = k.key, m = f.dA();
        null !== m && ((m = d.za(m)) ? (c.lh(l.data, c.Hb(m.data)), l = b.Nf(l.data), f = f.et(), null !== f && null !== l && h.add(f, l)) : c.lh(l.data, void 0))
        }
0 < g.count && b.WA(g, !1);
        if (0 < h.count)
        for (b = h.k; b.next(); )
        d.add(b.key, b.value)
        }
for (b = d.k; b.next(); )
        b.value.Qb();
        return d
        };
        function Le(a, b, c, d, f) {
        if (null === b || f && !b.canCopy())
                return null;
                if (d.contains(b))
                return a = d.za(b), a instanceof E ? a : null;
                var g = null, h = b.data;
                if (null !== h && null !== c) {
        var k = c.ba;
                b instanceof V ? k instanceof P && (h = k.eE(h), t.rb(h) && (k.Wv(h), g = c.Nf(h))) : (h = k.copyNodeData(h), t.rb(h) && (k.xm(h), g = c.eh(h)))
        } else
                Me(b), g = b.copy(), null !== c && g instanceof E && c.add(g);
                if (!(g instanceof E))
                return null;
                g.eb = !1;
                g.wg = !1;
                d.add(b, g);
                if (b instanceof S) {
        for (k = b.re; k.next(); ) {
        h = k.value;
                if (h.aa === b) {
        var l = d.za(h);
                null !== l &&
                (l.aa = g)
        }
        h.ca === b && (l = d.za(h), null !== l && (l.ca = g))
        }
        if (b instanceof T && g instanceof T)
                for (b = b.Xc; b.next(); )
                k = Le(a, b.value, c, d, f), k instanceof V || null === k || (k.gb = g)
        } else if (b instanceof V)
                for (k = b.aa, null !== k && (k = d.za(k), null !== k && (g.aa = k)), k = b.ca, null !== k && (k = d.za(k), null !== k && (g.ca = k)), b = b.ek; b.next(); )
                k = Le(a, b.value, c, d, f), null !== k && (k.Xd = g);
                return g
        }
oa.prototype.copySelection = function() {
var a = this.h;
        if (null !== a) {
for (var b = new C(E), a = a.selection.k; a.next(); )
        Je(b, a.value, !0, this.dE ? Infinity : 0, function(a) {
        return a.canCopy()
                });
        this.copyToClipboard(b)
        }
};
        oa.prototype.canCopySelection = function() {
        var a = this.h;
                return null !== a && a.Ri && a.$v && 0 !== a.selection.count ? !0 : !1
                };
        oa.prototype.cutSelection = function() {
        this.copySelection();
                this.deleteSelection()
                };
        oa.prototype.canCutSelection = function() {
        var a = this.h;
                return null !== a && !a.ab && !a.Ze && a.Ri && a.Yk && a.$v && 0 !== a.selection.count ? !0 : !1
                };
        oa.prototype.copyToClipboard = function(a) {
        var b = this.h;
                if (null !== b) {
        var c = null;
                if (null === a)
                t.Ss = null, t.gw = "";
                else {
                var c = b.ba, d = !1, f = !1, g = null;
                        try {
                        c instanceof Ld && (d = c.bl, c.bl = this.Yz), c instanceof P && (f = c.al, c.al = this.Xz), g = b.Im(a, null, !0)
                                } finally {
                c instanceof Ld && (c.bl = d), c instanceof P && (c.al = f), c = new B(E), c.Oe(g), t.Ss = c, t.gw = b.ba.Lm
                        }
                }
        b.Ba("ClipboardChanged", c)
                }
        };
        oa.prototype.pasteFromClipboard = function() {
        var a = new C(E), b = t.Ss;
                if (null === b)
                return a;
                var c = this.h;
                if (null === c || t.gw !== c.ba.Lm)
                return a;
                var d = c.ba, f = !1, g = !1, h = null;
                try {
                d instanceof Ld && (f = d.bl, d.bl = this.Yz), d instanceof P && (g = d.al, d.al = this.Xz), h = c.Im(b, c, !1)
                        } finally {
        for (d instanceof Ld && (d.bl = f), d instanceof P && (d.al = g), b = h.k; b.next(); )
                c = b.value, d = b.key, c.location.N() || (d.location.N() ? c.location = d.location : !c.position.N() && d.position.N() && (c.position = d.position)), a.add(c)
                }
        return a
                };
        oa.prototype.pasteSelection = function(a) {
        var b = this.h;
                if (null !== b)
                try {
                b.$b = "wait";
                        b.tc("Paste");
                        b.Ba("ChangingSelection");
                        var c = this.pasteFromClipboard();
                        0 < c.count && Xe(b);
                        for (var d = c.k; d.next(); )
                        d.value.eb = !0;
                        b.Ba("ChangedSelection");
                        if (a instanceof w) {
                var f = b.computePartsBounds(b.selection);
                        if (f) {
                var g = b.wb.Fd, h = g.computeEffectiveCollection(b.selection);
                        g.moveParts(h, new w(a.x - f.Da, a.y - f.Pa), !1)
                        }
                }
                b.Ba("ClipboardPasted", c)
                        } finally {
        b.Ce("Paste"), b.$b = ""
                }
        };
        oa.prototype.canPasteSelection = function() {
        var a = this.h;
                return null === a || a.ab || a.Ze || !a.ym || !a.$v || null === t.Ss || t.gw !== a.ba.Lm ? !1 : !0
                };
        oa.prototype.undo = function() {
        var a = this.h;
                null !== a && a.ja.undo()
                };
        oa.prototype.canUndo = function() {
        var a = this.h;
                return null === a || a.ab || a.Ze ? !1 : a.Lz && a.ja.canUndo()
                };
        oa.prototype.redo = function() {
        var a = this.h;
                null !== a && a.ja.redo()
                };
        oa.prototype.canRedo = function() {
        var a = this.h;
                return null === a || a.ab || a.Ze ? !1 : a.Lz && a.ja.canRedo()
                };
        oa.prototype.decreaseZoom = function(a) {
        void 0 === a && (a = 1 / this.Zt);
                t.q(a, oa, "decreaseZoom:factor");
                var b = this.h;
                null !== b && b.Cm === Ye && (a *= b.scale, a < b.Ag || a > b.yg || (b.scale = a))
                };
        oa.prototype.canDecreaseZoom = function(a) {
        void 0 === a && (a = 1 / this.Zt);
                t.q(a, oa, "canDecreaseZoom:factor");
                var b = this.h;
                if (null === b || b.Cm !== Ye)
                return!1;
                a *= b.scale;
                return a < b.Ag || a > b.yg ? !1 : b.Ns
                };
        oa.prototype.increaseZoom = function(a) {
        void 0 === a && (a = this.Zt);
                t.q(a, oa, "increaseZoom:factor");
                var b = this.h;
                null !== b && b.Cm === Ye && (a *= b.scale, a < b.Ag || a > b.yg || (b.scale = a))
                };
        oa.prototype.canIncreaseZoom = function(a) {
        void 0 === a && (a = this.Zt);
                t.q(a, oa, "canIncreaseZoom:factor");
                var b = this.h;
                if (null === b || b.Cm !== Ye)
                return!1;
                a *= b.scale;
                return a < b.Ag || a > b.yg ? !1 : b.Ns
                };
        oa.prototype.resetZoom = function(a) {
        void 0 === a && (a = this.Xs);
                t.q(a, oa, "resetZoom:newscale");
                var b = this.h;
                null === b || a < b.Ag || a > b.yg || (b.scale = a)
                };
        oa.prototype.canResetZoom = function(a) {
        void 0 === a && (a = this.Xs);
                t.q(a, oa, "canResetZoom:newscale");
                var b = this.h;
                return null === b || a < b.Ag || a > b.yg ? !1 : b.Ns
                };
        oa.prototype.zoomToFit = function() {
        var a = this.h;
                if (null !== a) {
        var b = a.scale, c = a.position;
                b !== this.DD || isNaN(this.bz) ? (this.bz = b, this.zC = c.copy(), a.zoomToFit(), a.zg(), this.DD = a.scale) : (a.scale = this.bz, a.position = this.zC)
                }
        };
        oa.prototype.canZoomToFit = function() {
        var a = this.h;
                return null === a ? !1 : a.Ns
                };
        oa.prototype.collapseTree = function(a) {
        void 0 === a && (a = null);
                var b = this.h;
                if (null === b)
                return!1;
                b.tc("Collapse Tree");
                var c = new B(S);
                if (a instanceof S && a.Oc)
                a.collapseTree(), c.add(a);
                else
                for (a = b.selection.k; a.next(); ) {
        var d = a.value;
                d instanceof S && d.Oc && (d.collapseTree(), c.add(d))
                }
        b.Ba("TreeCollapsed", c);
                b.Ce("Collapse Tree")
                };
        oa.prototype.canCollapseTree = function(a) {
        void 0 === a && (a = null);
                var b = this.h;
                if (null === b || b.ab)
                return!1;
                if (a instanceof S) {
        if (!a.Oc)
                return!1;
                if (0 < a.Bw().count)
                return!0
                } else
                for (a = b.selection.k; a.next(); )
                if (b = a.value, b instanceof S && b.Oc && 0 < b.Bw().count)
                return!0;
                return!1
                };
        oa.prototype.expandTree = function(a) {
        void 0 === a && (a = null);
                var b = this.h;
                if (null === b)
                return!1;
                b.tc("Expand Tree");
                var c = new B(S);
                if (a instanceof S && !a.Oc)
                a.expandTree(), c.add(a);
                else
                for (a = b.selection.k; a.next(); ) {
        var d = a.value;
                d instanceof S && !d.Oc && (d.expandTree(), c.add(d))
                }
        b.Ba("TreeExpanded", c);
                b.Ce("Expand Tree")
                };
        oa.prototype.canExpandTree = function(a) {
        void 0 === a && (a = null);
                var b = this.h;
                if (null === b || b.ab)
                return!1;
                if (a instanceof S) {
        if (a.Oc)
                return!1;
                if (0 < a.Bw().count)
                return!0
                } else
                for (a = b.selection.k; a.next(); )
                if (b = a.value, b instanceof S && !b.Oc && 0 < b.Bw().count)
                return!0;
                return!1
                };
        oa.prototype.groupSelection = function() {
        var a = this.h;
                if (null !== a) {
        var b = a.ba;
                if (null !== b && b instanceof P) {
        var c = this.Nz;
                if (null !== c) {
        var d = null;
                try {
                a.$b = "wait";
                        a.tc("Group");
                        a.Ba("ChangingSelection");
                        for (var f = new B(E), g = a.selection.k; g.next(); ) {
                var h = g.value;
                        h.Jd() && h.canGroup() && f.add(h)
                        }
                for (var k = new B(E), l = f.k; l.next(); ) {
                for (var m = l.value, h = !1, g = f.k; g.next(); )
                        if (m.ml(g.value)) {
                h = !0;
                        break
                        }
                h || k.add(m)
                        }
                if (0 < k.count) {
                g = k.k;
                        g.next();
                        var n = g.value.gb;
                        if (null !== n)
                        for (; null !== n; ) {
                g = k.k;
                        g.next();
                        for (f =
                                !1; g.next(); )
                        if (m = g.value, !m.ml(n)) {
                f = !0;
                        break
                        }
                if (f)
                        n = n.gb;
                        else
                        break
                        }
                if (c instanceof T)
                        Me(c), d = c.copy(), d instanceof T && a.add(d);
                        else if (b.sA(c)) {
                var p = b.copyNodeData(c);
                        t.rb(p) && (b.xm(p), d = a.Aw(p))
                        }
                if (d instanceof T) {
                null !== n && this.isValidMember(n, d) && (d.gb = n);
                        for (g = k.k; g.next(); )
                        m = g.value, this.isValidMember(d, m) && (m.gb = d);
                        a.select(d)
                        }
                }
                a.Ba("ChangedSelection");
                        a.Ba("SelectionGrouped", d)
                        } finally {
        a.Ce("Group"), a.$b = ""
                }
        }
        }
        }
        };
        oa.prototype.canGroupSelection = function() {
        var a = this.h;
                if (null === a || a.ab || a.Ze || !a.ym || !a.Mo)
                return!1;
                var b = a.ba;
                if (null === b || !(b instanceof P) || null === this.Nz)
                return!1;
                for (a = a.selection.k; a.next(); )
                if (b = a.value, b.Jd() && b.canGroup())
                return!0;
                return!1
                };
        function Ze(a) {
        var b = t.Cb();
                for (a = a.k; a.next(); ) {
        var c = a.value;
                c instanceof V || b.push(c)
        }
        a = new C(E);
                for (var c = b.length, d = 0; d < c; d++) {
        for (var f = b[d], g = !0, h = 0; h < c; h++)
                if (f.ml(b[h])) {
        g = !1;
                break
        }
        g && a.add(f)
        }
        t.ya(b);
                return a
        }
oa.prototype.isValidMember = function(a, b) {
if (null === b || a === b || b instanceof V)
        return!1;
        if (null !== a) {
if (a === b || a.ml(b))
        return!1;
        var c = a.ut;
        if (null !== c && !c(a, b) || null === a.data && null !== b.data || null !== a.data && null === b.data)
        return!1
        }
c = this.ut;
        return null !== c ? c(a, b) : !0
        };
        oa.prototype.ungroupSelection = function(a) {
        void 0 === a && (a = null);
                var b = this.h;
                if (null !== b) {
        var c = b.ba;
                if (null !== c && c instanceof P)
                try {
                b.$b = "wait";
                        b.tc("Ungroup");
                        b.Ba("ChangingSelection");
                        var d = new B(T);
                        if (a instanceof T)
                        d.add(a);
                        else
                        for (var f = b.selection.k; f.next(); ) {
                var g = f.value;
                        g instanceof T && g.canUngroup() && d.add(g)
                        }
                if (0 < d.count)
                        for (b.fw(), f = d.k; f.next(); ) {
                var h = f.value, k = h.data, l = h.gb, m = null !== l && null !== l.data ? c.Hb(l.data) : void 0, n = new B(E);
                        n.Oe(h.Xc);
                        for (var p = n.k; p.next(); ) {
                var q = p.value;
                        if (!(q instanceof V)) {
                var r = q.data;
                        null !== r ? c.sx(r, m) : q.gb = l;
                        q.eb = !0
                        }
                }
                null !== k ? c.jx(k) : b.remove(h)
                        }
                b.Ba("ChangedSelection");
                        b.Ba("SelectionUngrouped", d, n)
                        } finally {
        b.Ce("Ungroup"), b.$b = ""
                }
        }
        };
        oa.prototype.canUngroupSelection = function(a) {
        void 0 === a && (a = null);
                var b = this.h;
                if (null === b || b.ab || b.Ze || !b.Yk || !b.Ro)
                return!1;
                var c = b.ba;
                if (null === c || !(c instanceof P))
                return!1;
                if (a instanceof T) {
        if (a.canUngroup())
                return!0
                } else
                for (a = b.selection.k; a.next(); )
                if (b = a.value, b instanceof T && b.canUngroup())
                return!0;
                return!1
                };
        oa.prototype.addTopLevelParts = function(a, b) {
        for (var c = !0, d = Ze(a).k; d.next(); ) {
        var f = d.value;
                null !== f.gb && (!b || this.isValidMember(null, f) ? f.gb = null : c = !1)
                }
        return c
                };
        oa.prototype.collapseSubGraph = function(a) {
        void 0 === a && (a = null);
                var b = this.h;
                if (null === b)
                return!1;
                b.tc("Collapse SubGraph");
                var c = new B(T);
                if (a instanceof T && a.qe)
                a.collapseSubGraph(), c.add(a);
                else
                for (a = b.selection.k; a.next(); ) {
        var d = a.value;
                d instanceof T && d.qe && (d.collapseSubGraph(), c.add(d))
                }
        b.Ba("SubGraphCollapsed", c);
                b.Ce("Collapse SubGraph")
                };
        oa.prototype.canCollapseSubGraph = function(a) {
        void 0 === a && (a = null);
                var b = this.h;
                if (null === b || b.ab)
                return!1;
                if (a instanceof T)
                return a.qe ? !0 : !1;
                for (a = b.selection.k; a.next(); )
                if (b = a.value, b instanceof T && b.qe)
                return!0;
                return!1
                };
        oa.prototype.expandSubGraph = function(a) {
        void 0 === a && (a = null);
                var b = this.h;
                if (null === b)
                return!1;
                b.tc("Expand SubGraph");
                var c = new B(T);
                if (a instanceof T && !a.qe)
                a.expandSubGraph(), c.add(a);
                else
                for (a = b.selection.k; a.next(); ) {
        var d = a.value;
                d instanceof T && !d.qe && (d.expandSubGraph(), c.add(d))
                }
        b.Ba("SubGraphExpanded", c);
                b.Ce("Expand SubGraph")
                };
        oa.prototype.canExpandSubGraph = function(a) {
        void 0 === a && (a = null);
                var b = this.h;
                if (null === b || b.ab)
                return!1;
                if (a instanceof T)
                return a.qe ? !1 : !0;
                for (a = b.selection.k; a.next(); )
                if (b = a.value, b instanceof T && !b.qe)
                return!0;
                return!1
                };
        oa.prototype.editTextBlock = function(a) {
        void 0 === a && (a = null);
                var b = this.h;
                if (null !== b) {
        var c = b.wb.yx;
                if (null !== c) {
        if (null === a) {
        a = b.selection.k;
                for (var d = null; a.next(); ) {
        var f = a.value;
                if (f.canEdit()) {
        d = f;
                break
                }
        }
        if (null === d)
                return;
                a = d.at(function(a) {
                return a instanceof na && a.uw
                        })
                }
        null !== a && a instanceof na && (c.Lg = a, b.Ua = c)
                }
        }
        };
        oa.prototype.canEditTextBlock = function(a) {
        void 0 === a && (a = null);
                var b = this.h;
                if (null === b || b.ab || b.Ze || !b.Qo || null === b.wb.yx)
                return!1;
                if (a instanceof na) {
        if (a = a.S, null !== a && a.canEdit())
                return!0
                } else
                for (b = b.selection.k; b.next(); )
                if (a = b.value, a.canEdit() && (a = a.at(function(a) {
                return a instanceof na && a.uw
                        }), null !== a))
                return!0;
                return!1
                };
        oa.prototype.showContextMenu = function(a) {
        var b = this.h;
                if (null !== b) {
        var c = b.wb.lw;
                if (null !== c && (void 0 === a && (a = 0 < b.selection.count ? b.selection.$a() : b), a = c.findObjectWithContextMenu(a), null !== a)) {
        var d = new ld, f = null;
                a instanceof Q ? f = a.qb(Kb) : b.bo || (f = b.xb, f = new w(f.x + f.width / 2, f.y + f.height / 2));
                null !== f && (d.Ke = b.FG(f), d.ea = f, b.ec = d);
                b.Ua = c;
                $e(c, !1, a)
                }
        }
        };
        oa.prototype.canShowContextMenu = function(a) {
        var b = this.h;
                if (null === b)
                return!1;
                var c = b.wb.lw;
                if (null === c)
                return!1;
                void 0 === a && (a = 0 < b.selection.count ? b.selection.$a() : b);
                return null === c.findObjectWithContextMenu(a) ? !1 : !0
                };
        t.g(oa, "copiesTree", oa.prototype.dE);
        t.defineProperty(oa, {dE: "copiesTree"}, function() {
        return this.PB
                }, function(a) {
        t.i(a, "boolean", oa, "copiesTree");
                this.PB = a
                });
        t.g(oa, "deletesTree", oa.prototype.sE);
        t.defineProperty(oa, {sE: "deletesTree"}, function() {
        return this.ZB
                }, function(a) {
        t.i(a, "boolean", oa, "deletesTree");
                this.ZB = a
                });
        t.g(oa, "copiesParentKey", oa.prototype.Yz);
        t.defineProperty(oa, {Yz: "copiesParentKey"}, function() {
        return this.OB
                }, function(a) {
        t.i(a, "boolean", oa, "copiesParentKey");
                this.OB = a
                });
        t.g(oa, "copiesGroupKey", oa.prototype.Xz);
        t.defineProperty(oa, {Xz: "copiesGroupKey"}, function() {
        return this.NB
                }, function(a) {
        t.i(a, "boolean", oa, "copiesGroupKey");
                this.NB = a
                });
        t.g(oa, "archetypeGroupData", oa.prototype.Nz);
        t.defineProperty(oa, {Nz: "archetypeGroupData"}, function() {
        return this.gy
                }, function(a) {
        null !== a && t.l(a, Object, oa, "archetypeGroupData");
                var b = this.h;
                null !== b && (b = b.ba, b instanceof P && (a instanceof T || b.sA(a) || t.m("CommandHandler.archetypeGroupData must be either a Group or a data object for which GraphLinksModel.isGroupForNodeData is true: " + a)));
                this.gy = a
                });
        t.g(oa, "memberValidation", oa.prototype.ut);
        t.defineProperty(oa, {ut: "memberValidation"}, function() {
        return this.Nk
                }, function(a) {
        null !== a && t.i(a, "function", oa, "memberValidation");
                this.Nk = a
                });
        t.g(oa, "defaultScale", oa.prototype.Xs);
        t.defineProperty(oa, {Xs: "defaultScale"}, function() {
        return this.XB
                }, function(a) {
        t.q(a, oa, "defaultScale");
                0 < a || t.m("defaultScale must be larger than zero, not: " + a);
                this.XB = a
                });
        t.g(oa, "zoomFactor", oa.prototype.Zt);
        t.defineProperty(oa, {Zt: "zoomFactor"}, function() {
        return this.CD
                }, function(a) {
        t.q(a, oa, "zoomFactor");
                1 < a || t.m("zoomFactor must be larger than 1.0, not: " + a);
                this.CD = a
                });
        function be() {
        0 < arguments.length && t.$c(be);
                t.Ac(this);
                this.U = null;
                this.Yb = "";
                this.Le = !0;
                this.lC = !1;
                this.yD = null;
                this.Uv = - 1
        }
t.ga("Tool", be);
        be.prototype.wd = function(a) {
        e && null !== a && t.l(a, z, be, "setDiagram");
                this.U = a
                };
        be.prototype.toString = function() {
        return"" !== this.name ? this.name + " Tool" : t.ug(Object.getPrototypeOf(this))
                };
        be.prototype.updateAdornments = function() {
        };
        be.prototype.canStart = function() {
        return this.isEnabled
                };
        be.prototype.doStart = function() {
        };
        be.prototype.doActivate = function() {
        this.ha = !0
                };
        be.prototype.doDeactivate = function() {
        this.ha = !1
                };
        be.prototype.doStop = function() {
        };
        be.prototype.doCancel = function() {
        this.stopTool()
                };
        be.prototype.stopTool = function() {
        var a = this.h;
                null !== a && a.Ua === this && (a.Ua = null, a.$b = "")
                };
        be.prototype.doMouseDown = function() {
        !this.ha && this.canStart() && this.doActivate()
                };
        be.prototype.doMouseMove = function() {
        };
        be.prototype.doMouseUp = function() {
        this.stopTool()
                };
        be.prototype.doMouseWheel = function() {
        };
        be.prototype.doKeyDown = function() {
        var a = this.h;
                null !== a && "Esc" === a.R.key && this.doCancel()
                };
        be.prototype.doKeyUp = function() {
        };
        be.prototype.startTransaction = be.prototype.tc = function(a) {
        this.ff = null;
                var b = this.h;
                return null === b ? !1 : b.tc(a)
                };
        be.prototype.stopTransaction = be.prototype.gk = function() {
        var a = this.h;
                return null === a ? !1 : null === this.ff ? a.Mp() : a.Ce(this.ff)
                };
        be.prototype.standardMouseSelect = function() {
        var a = this.h;
                if (null !== a && a.Pe) {
        var b = a.R, c = a.dt(b.ea, !1);
                if (null !== c)
                if (t.Um ? b.Ap : b.control) {
        a.Ba("ChangingSelection");
                for (b = c; null !== b && !b.canSelect(); )
                b = b.gb;
                null !== b && (b.eb = !b.eb);
                a.Ba("ChangedSelection")
                } else if (b.shift) {
        if (!c.eb) {
        a.Ba("ChangingSelection");
                for (b = c; null !== b && !b.canSelect(); )
                b = b.gb;
                null !== b && (b.eb = !0);
                a.Ba("ChangedSelection")
                }
        } else {
        if (!c.eb) {
        for (b = c; null !== b && !b.canSelect(); )
                b = b.gb;
                null !== b && a.select(b)
                }
        }
        else
                !b.left || (t.Um ? b.Ap : b.control) ||
                b.shift || a.fw()
                }
        };
        be.prototype.standardMouseClick = function(a, b) {
        void 0 === a && (a = null);
                void 0 === b && (b = function(a) {
                return!a.layer.yc
                        });
                var c = this.h;
                if (null !== c) {
        var d = c.R, f = c.ne(d.ea, a, b);
                d.ae = f;
                af(f, d, c)
                }
        };
        function af(a, b, c) {
        var d = 0;
                b.left ? d = 1 === b.Ae ? 1 : 2 === b.Ae ? 2 : 1 : b.right && 1 === b.Ae && (d = 3);
                var f = "";
                if (null !== a) {
        switch (d) {
        case 1:
                f = "ObjectSingleClicked";
                break;
                case 2:
                f = "ObjectDoubleClicked";
                break;
                case 3:
                f = "ObjectContextClicked"
        }
        0 !== d && c.Ba(f, a)
        } else {
        switch (d) {
        case 1:
                f = "BackgroundSingleClicked";
                break;
                case 2:
                f = "BackgroundDoubleClicked";
                break;
                case 3:
                f = "BackgroundContextClicked"
        }
        0 !== d && c.Ba(f)
        }
        if (null !== a)
                for (; null !== a; ) {
        f = null;
                switch (d) {
        case 1:
                f = a.click;
                break;
                case 2:
                f = a.Nm ? a.Nm : a.click;
                break;
                case 3:
                f = a.Vs
        }
        if (null !==
                f && (f(b, a), b.Ee))
                break;
                a = a.ia
        }
        else {
        f = null;
                switch (d) {
        case 1:
                f = c.click;
                break;
                case 2:
                f = c.Nm ? c.Nm : c.click;
                break;
                case 3:
                f = c.Vs
        }
        null !== f && f(b)
        }
        }
be.prototype.standardMouseOver = function() {
var a = this.h;
        if (null !== a) {
var b = a.R;
        if (null !== b.h && !0 !== a.Zb.sd) {
var c = a.Wa;
        a.Wa = !0;
        var d = a.ne(b.ea, null, null);
        b.ae = d;
        var f = !1;
        if (d !== a.Bn) {
var g = a.Bn, h = g;
        a.Bn = d;
        for (this.doCurrentObjectChanged(g, d); null !== g; ) {
var k = g.FA;
        if (null !== k) {
if (d === g)
        break;
        if (null !== d && d.dj(g))
        break;
        k(b, g, d);
        f = !0;
        if (b.Ee)
        break
        }
g = g.ia
        }
for (g = h; null !== d; ) {
k = d.EA;
        if (null !== k) {
if (g === d)
        break;
        if (null !== g && g.dj(d))
        break;
        k(b, d, g);
        f = !0;
        if (b.Ee)
        break
        }
d = d.ia
        }
d = a.Bn
        }
if (null !== d) {
g = d;
        for (k = ""; null !==
                g; ) {
k = g.cursor;
        if ("" !== k)
        break;
        g = g.ia
        }
a.$b = k;
        for (g = d; null !== g; ) {
k = g.yt;
        if (null !== k && (k(b, g), f = !0, b.Ee))
        break;
        g = g.ia
        }
} else
        a.$b = "", k = a.yt, null !== k && (k(b), f = !0);
        f && a.Zd();
        a.Wa = c
        }
}
};
        be.prototype.doCurrentObjectChanged = function() {
        };
        be.prototype.standardMouseWheel = function() {
        var a = this.h;
                if (null !== a) {
        var b = a.R, c = b.Yj;
                if (0 !== c && a.Ed.N()) {
        var d = a.Se, f = a.wb.bn;
                if ((f === bf && !b.shift || f === cf && b.control) && (0 < c ? d.canIncreaseZoom() : d.canDecreaseZoom()))
                f = a.Xf, a.Xf = b.Ke, 0 < c ? d.increaseZoom() : d.decreaseZoom(), a.Xf = f, b.bubbles = !1;
                else if (f === bf && b.shift || f === cf && !b.control) {
        d = a.position.copy();
                f = 0 < c ? c : - c;
                if (!b.shift && a.of) {
        var g = a.Qp, f = f / 40 * g;
                0 < c ? a.scroll("pixel", "up", f) : a.scroll("pixel", "down", f)
                } else
                b.shift && a.nf && (g = a.Pp, f = f / 40 * g, 0 < c ?
                        a.scroll("pixel", "left", f) : a.scroll("pixel", "right", f));
                a.position.M(d) || (b.bubbles = !1)
                }
        }
        }
        };
        be.prototype.standardWaitAfter = function(a) {
        t.i(a, "number", be, "standardWaitAfter:delay");
                this.cancelWaitAfter();
                var b = this;
                this.Uv = window.setTimeout(function() {
                b.doWaitAfter()
                        }, a)
                };
        be.prototype.cancelWaitAfter = function() {
        - 1 !== this.Uv && window.clearTimeout(this.Uv);
                this.Uv = - 1
                };
        be.prototype.doWaitAfter = function() {
        };
        be.prototype.findToolHandleAt = function(a, b) {
        var c = this.h;
                if (null === c)
                return null;
                c = c.ne(a, null, function(a) {
                a = a.S;
                        return null === a ? !1 : null !== a.pc
                        });
                if (null === c)
                return null;
                var d = c.S;
                return null === d || d.Wc !== b ? null : c
                };
        be.prototype.isBeyondDragSize = function(a, b) {
        var c = this.h;
                if (null === c)
                return!1;
                void 0 === a && (a = c.Lc.Ke);
                void 0 === b && (b = c.R.Ke);
                var d = c.wb.uE, c = d.width, d = d.height;
                t.hB && (c += 6, d += 6);
                return Math.abs(b.x - a.x) > c || Math.abs(b.y - a.y) > d
                };
        t.A(be, {h: "diagram"}, function() {
        return this.U
                });
        t.g(be, "name", be.prototype.name);
        t.defineProperty(be, {name: "name"}, function() {
        return this.Yb
                }, function(a) {
        t.i(a, "string", be, "name");
                this.Yb = a
                });
        t.g(be, "isEnabled", be.prototype.isEnabled);
        t.defineProperty(be, {isEnabled: "isEnabled"}, function() {
        return this.Le
                }, function(a) {
        t.i(a, "boolean", be, "isEnabled");
                this.Le = a
                });
        t.g(be, "isActive", be.prototype.ha);
        t.defineProperty(be, {ha: "isActive"}, function() {
        return this.lC
                }, function(a) {
        t.i(a, "boolean", be, "isActive");
                this.lC = a
                });
        t.g(be, "transactionResult", be.prototype.ff);
        t.defineProperty(be, {ff: "transactionResult"}, function() {
        return this.yD
                }, function(a) {
        null !== a && t.i(a, "string", be, "transactionResult");
                this.yD = a
                });
        function df() {
        0 < arguments.length && t.$c(df);
                be.call(this);
                this.name = "Dragging";
                this.MB = this.pC = !0;
                this.Vq = this.dC = !1;
                this.tC = !0;
                this.Qy = (new ga(NaN, NaN)).freeze();
                this.Ry = Eb;
                this.Sy = (new w(NaN, NaN)).freeze();
                this.cC = !1;
                this.aC = this.LB = this.bC = this.SB = this.Ji = null;
                this.Hq = this.rC = !1;
                this.Bo = new w(NaN, NaN);
                this.Iv = new w;
                this.ts = !1;
                this.Gv = this.oC = !0;
                this.Ln = 100;
                this.Ll = this.wv = null
        }
t.ga("DraggingTool", df);
        t.Ka(df, be);
        t.g(df, "isCopyEnabled", df.prototype.qA);
        t.defineProperty(df, {qA: "isCopyEnabled"}, function() {
        return this.pC
                }, function(a) {
        t.i(a, "boolean", df, "isCopyEnabled");
                this.pC = a
                });
        t.g(df, "copiesEffectiveCollection", df.prototype.cE);
        t.defineProperty(df, {cE: "copiesEffectiveCollection"}, function() {
        return this.MB
                }, function(a) {
        t.i(a, "boolean", df, "copiesEffectiveCollection");
                this.MB = a
                });
        t.g(df, "dragsTree", df.prototype.vE);
        t.defineProperty(df, {vE: "dragsTree"}, function() {
        return this.dC
                }, function(a) {
        t.i(a, "boolean", df, "dragsTree");
                this.dC = a
                });
        t.g(df, "isGridSnapEnabled", df.prototype.pp);
        t.defineProperty(df, {pp: "isGridSnapEnabled"}, function() {
        return this.Vq
                }, function(a) {
        t.i(a, "boolean", df, "isGridSnapEnabled");
                this.Vq = a
                });
        t.g(df, "isComplexRoutingRealtime", df.prototype.$E);
        t.defineProperty(df, {$E: "isComplexRoutingRealtime"}, function() {
        return this.oC
                }, function(a) {
        t.i(a, "boolean", df, "isComplexRoutingRealtime");
                this.oC = a
                });
        t.g(df, "isGridSnapRealtime", df.prototype.bF);
        t.defineProperty(df, {bF: "isGridSnapRealtime"}, function() {
        return this.tC
                }, function(a) {
        t.i(a, "boolean", df, "isGridSnapRealtime");
                this.tC = a
                });
        t.g(df, "gridSnapCellSize", df.prototype.lA);
        t.defineProperty(df, {lA: "gridSnapCellSize"}, function() {
        return this.Qy
                }, function(a) {
        t.l(a, ga, df, "gridSnapCellSize");
                this.Qy.M(a) || (this.Qy = a = a.Z())
                });
        t.g(df, "gridSnapCellSpot", df.prototype.KE);
        t.defineProperty(df, {KE: "gridSnapCellSpot"}, function() {
        return this.Ry
                }, function(a) {
        t.l(a, I, df, "gridSnapCellSpot");
                this.Ry.M(a) || (this.Ry = a = a.Z())
                });
        t.g(df, "gridSnapOrigin", df.prototype.LE);
        t.defineProperty(df, {LE: "gridSnapOrigin"}, function() {
        return this.Sy
                }, function(a) {
        t.l(a, w, df, "gridSnapOrigin");
                this.Sy.M(a) || (this.Sy = a = a.Z())
                });
        t.g(df, "dragsLink", df.prototype.Zh);
        t.defineProperty(df, {Zh: "dragsLink"}, function() {
        return this.cC
                }, function(a) {
        t.i(a, "boolean", df, "dragsLink");
                this.cC = a
                });
        t.g(df, "currentPart", df.prototype.Xo);
        t.defineProperty(df, {Xo: "currentPart"}, function() {
        return this.SB
                }, function(a) {
        null !== a && t.l(a, E, df, "currentPart");
                this.SB = a
                });
        t.g(df, "copiedParts", df.prototype.md);
        t.defineProperty(df, {md: "copiedParts"}, function() {
        return this.LB
                }, function(a) {
        this.LB = a
                });
        t.g(df, "draggedParts", df.prototype.Dc);
        t.defineProperty(df, {Dc: "draggedParts"}, function() {
        return this.bC
                }, function(a) {
        this.bC = a
                });
        t.g(df, "draggedLink", df.prototype.Kc);
        t.defineProperty(df, {Kc: "draggedLink"}, function() {
        return this.aC
                }, function(a) {
        null !== a && t.l(a, V, df, "draggedLink");
                this.aC = a
                });
        t.g(df, "isDragOutStarted", df.prototype.ot);
        t.defineProperty(df, {ot: "isDragOutStarted"}, function() {
        return this.rC
                }, function(a) {
        this.rC = a
                });
        t.g(df, "startPoint", df.prototype.ij);
        t.defineProperty(df, {ij: "startPoint"}, function() {
        return this.Iv
                }, function(a) {
        t.l(a, w, df, "startPoint");
                this.Iv.M(a) || (this.Iv = a = a.Z())
                });
        t.g(df, "delay", df.prototype.rw);
        t.defineProperty(df, {rw: "delay"}, function() {
        return this.Ln
                }, function(a) {
        t.i(a, "number", df, "delay");
                this.Ln = a
                });
        df.prototype.canStart = function() {
        if (!this.isEnabled)
                return!1;
                var a = this.h;
                if (null === a || !a.Sj && !a.Ri && !a.Ms || !a.Pe)
                return!1;
                var b = a.R;
                return!b.left || a.Ua !== this && (!this.isBeyondDragSize() || b.Qw && b.timestamp - a.Lc.timestamp < this.Ln) ? !1 : null !== this.findDraggablePart()
                };
        df.prototype.findDraggablePart = function() {
        var a = this.h;
                if (null === a)
                return null;
                a = a.dt(a.Lc.ea, !1);
                if (null === a)
                return null;
                for (; null !== a && !a.canSelect(); )
                a = a.gb;
                return null !== a && (a.canMove() || a.canCopy()) ? a : null
                };
        df.prototype.standardMouseSelect = function() {
        var a = this.h;
                if (null !== a && a.Pe) {
        var b = a.dt(a.Lc.ea, !1);
                if (null !== b) {
        for (; null !== b && !b.canSelect(); )
                b = b.gb;
                this.Xo = b;
                this.Xo.eb || (a.Ba("ChangingSelection"), b = a.R, (t.Um ? b.Ap : b.control) || b.shift || Xe(a), this.Xo.eb = !0, a.Ba("ChangedSelection"))
                }
        }
        };
        df.prototype.doActivate = function() {
        var a = this.h;
                if (null !== a) {
        this.standardMouseSelect();
                var b = this.Xo;
                null !== b && (b.canMove() || b.canCopy()) && (this.ha = !0, this.Bo.set(a.position), ef(this, a.selection), this.Ll = this.wv = null, this.Dc = this.computeEffectiveCollection(a.selection), a.zo = !0, ff(this, this.Dc), this.tc("Drag"), this.ij = a.Lc.ea, a.Hd = !0, a.Ms && (this.ot = !0, this.Hq = !1, gf = this, hf = this.h, this.doSimulatedDragOut()))
                }
        };
        function ef(a, b) {
        if (a.Zh) {
        var c = a.h;
                null !== c && c.Tj && (c.ba instanceof P && 1 === b.count && b.$a()instanceof V ? (a.Kc = b.$a(), a.Kc.canRelinkFrom() && a.Kc.canRelinkTo() && a.Kc.Mf(), a.Ji = c.wb.TA, null === a.Ji && (a.Ji = new jf, a.Ji.h = c)) : (a.Kc = null, a.Ji = null))
        }
        }
df.prototype.computeEffectiveCollection = function(a) {
var b = null !== this.h && this.h.Ua === this, c = new ja(E, Object);
        if (null === a)
        return c;
        for (var d = a.k; d.next(); ) {
var f = d.value;
        kf(this, c, f, b)
        }
if (null !== this.Kc && this.Zh)
        return c;
        for (d = a.k; d.next(); )
        f = d.value, f instanceof V && (a = f, b = a.aa, null === b || c.contains(b) ? (b = a.ca, null === b || c.contains(b) || c.remove(a)) : c.remove(a));
        return c
        };
        function tf(a) {
        return void 0 === a ? {point: H.mj, rz: H.mj} : {point: a.copy(), rz: H.mj}
        }
function kf(a, b, c, d) {
if (!b.contains(c) && (!d || c.canMove() || c.canCopy()))
        if (c instanceof S) {
b.add(c, tf(c.location));
        if (c instanceof T)
        for (var f = c.Xc; f.next(); ) {
var g = f.value;
        kf(a, b, g, d)
        }
for (g = c.re; g.next(); )
        if (f = g.value, !b.contains(f)) {
var h = f.aa, k = f.ca;
        null !== h && b.contains(h) && null !== k && b.contains(k) && kf(a, b, f, d)
        }
if (a.vE)
        for (c = c.BE(); c.next(); )
        g = c.value, kf(a, b, g, d)
        } else if (c instanceof V)
        for (f = c, b.add(f, tf()), g = f.ek; g.next(); )
        kf(a, b, g.value, d);
        else
        c instanceof Ke || b.add(c, tf(c.location))
        }
df.prototype.doDeactivate = function() {
this.ha = !1;
        var a = this.h;
        null !== a && uf(a);
        vf(this);
        wf(this, this.Dc);
        this.Dc = null;
        this.Hq = this.ot = !1;
        if (0 < xf.count) {
for (var b = xf.length, c = 0; c < b; c++) {
var d = xf.n[c];
        yf(d);
        zf(d);
        vf(d);
        null !== d.h && uf(d.h)
        }
xf.clear()
        }
yf(this);
        this.Bo.Rp(NaN, NaN);
        gf = hf = null;
        zf(this);
        a.Hd = !1;
        a.$b = "";
        a.zo = !1;
        this.gk()
        };
        function vf(a) {
        var b = a.h;
                if (null !== b) {
        var c = b.Wa;
                b.Wa = !0;
                for (var d = b.R, f = a.Ll; null !== f; ) {
        var g = f.DA;
                if (null !== g && (g(d, f, null), d.Ee))
                break;
                f = f.ia
        }
        b.Wa = c
        }
        a.wv = null;
                a.Ll = null
        }
function Af() {
var a = gf;
        zf(a);
        Bf(a);
        var b = a.h;
        null !== b && a.Bo.N() && (b.position = a.Bo);
        null !== b && uf(b)
        }
df.prototype.doCancel = function() {
zf(this);
        Bf(this);
        var a = this.h;
        null !== a && this.Bo.N() && (a.position = this.Bo);
        this.stopTool()
        };
        function ff(a, b) {
        if (null !== b) {
        a.ts = !0;
                for (var c = b.k; c.next(); ) {
        var d = c.key;
                d instanceof V && (d.Vp = !0)
        }
        }
        }
function wf(a, b) {
if (null !== b && a.ts) {
for (var c = b.k; c.next(); ) {
var d = c.key;
        d instanceof V && (d.Vp = !1, d.cj ? Cf(d) && d.ac() : d.fa())
        }
a.ts = !1
        }
}
df.prototype.doKeyDown = function() {
var a = this.h;
        null !== a && (a = a.R, null !== a && this.ha && ("Esc" === a.key ? this.doCancel() : this.doMouseMove()))
        };
        df.prototype.doKeyUp = function() {
        var a = this.h;
                null !== a && null !== a.R && this.ha && this.doMouseMove()
                };
        function Df(a, b) {
        for (var c = Infinity, d = Infinity, f = - Infinity, g = - Infinity, h = a.k; h.next(); ) {
        var k = h.value;
                if (k.Jd()) {
        var l = k.location, k = l.x, l = l.y;
                isNaN(k) || isNaN(l) || (k < c && (c = k), l < d && (d = l), k > f && (f = k), l > g && (g = l))
        }
        }
        Infinity === c ? b.p(0, 0, 0, 0) : b.p(c, d, f - c, g - d)
        }
function Ef(a, b) {
if (null === a.md) {
var c = a.h;
        if (!(null === c || b && (c.ab || c.Ze)) && null !== a.Dc) {
var d = c.ja;
        d.isEnabled && d.cF ? null !== d.Xi && 0 < d.Xi.ah.count && (c.ja.Mp(), c.tc("Drag")) : Bf(a);
        c.Wa = !b;
        c.un = !b;
        a.ij = c.Lc.ea;
        c = a.cE ? c.Im(a.Dc.Dl(), c, !0) : c.Im(c.selection, c, !0);
        for (d = c.k; d.next(); )
        d.value.location = d.key.location;
        d = t.Df();
        Df(c, d);
        t.hc(d);
        for (var d = new ja(E, Object), f = a.Dc.k; f.next(); ) {
var g = f.key;
        g.Jd() && g.canCopy() && (g = c.za(g), null !== g && (g.rf(), d.add(g, tf(g.location))))
        }
for (c = c.k; c.next(); )
        f = c.value,
        f instanceof V && f.canCopy() && d.add(f, tf());
        a.md = d;
        ef(a, d.Dl());
        null !== a.Kc && (c = a.Kc, d = c.uj(), c.pl(a.ij.x - (d.x + d.width / 2), a.ij.y - (d.y + d.height / 2)))
        }
}
}
function zf(a) {
var b = a.h;
        null !== b && (null !== a.md && (b.WA(a.md.Dl(), !1), a.md = null), b.Wa = !1, b.un = !1, a.ij = b.Lc.ea)
        }
function yf(a) {
if (null !== a.Kc) {
if (a.Zh && null !== a.Ji) {
var b = a.Ji;
        b.h.remove(b.be);
        b.h.remove(b.ce)
        }
a.Kc = null;
        a.Ji = null
        }
}
function Ff(a, b, c) {
var d = a.h;
        if (null !== d) {
var f = a.ij, g = t.K();
        g.assign(d.R.ea);
        a.moveParts(b, g.St(f), c);
        t.B(g)
        }
}
df.prototype.moveParts = function(a, b, c) {
if (null !== a && (t.l(a, ja, df, "moveParts:parts"), 0 !== a.count)) {
var d = t.K(), f = t.K();
        f.assign(b);
        isNaN(f.x) && (f.x = 0);
        isNaN(f.y) && (f.y = 0);
        var g = this.ts;
        g || ff(this, a);
        for (var h = new B, k = new B(Ea), l = a.k; l.next(); ) {
var m = l.key;
        if (m.Jd()) {
var n = Gf(this, m, a);
        if (null !== n)
        h.add({Fc: m, info: l.value, JI: n});
        else if (!c || m.canMove()) {
n = l.value.point;
        d.assign(n);
        var p = t.K();
        this.computeMove(m, d.add(f), a, p);
        m.location = p;
        t.B(p);
        l.value.rz = p.St(n)
        }
} else
        l.key instanceof V && k.add(l.yb)
        }
for (c =
        h.k; c.next(); )
        h = c.value, n = h.info.point, d.assign(n), h.Fc.location = d.add(h.JI.rz);
        n = t.K();
        c = t.K();
        for (k = k.k; k.next(); )
        if (p = k.value, h = p.key, h instanceof V)
        if (h.Vp)
        if (l = h.aa, m = h.ca, null !== this.Kc && this.Zh)
        p = p.value.point, a.add(h, tf(f)), l = b.x - p.x, m = b.y - p.y, h.pl(l, m);
        else {
        if (null !== l) {
        n.assign(l.location);
                var q = a.za(l);
                null !== q && n.St(q.point)
                }
        null !== m && (c.assign(m.location), q = a.za(m), null !== q && c.St(q.point));
                null !== l && null !== m ? n.sf(c) ? (p = p.value.point, l = d, l.assign(n), l.St(p), a.add(h, tf(n)), h.pl(l.x, l.y)) :
                (h.Vp = !1, h.ac()) : (p = p.value.point, a.add(h, tf(null !== l ? n : null !== m ? c : b)), l = f.x - p.x, m = f.y - p.y, h.pl(l, m))
                }
else if (null === h.aa || null === h.ca)
        p = p.value.point, a.add(h, tf(b)), l = f.x - p.x, m = f.y - p.y, h.pl(l, m);
        t.B(d);
        t.B(f);
        t.B(n);
        t.B(c);
        g || wf(this, a)
        }
};
        function Gf(a, b, c) {
        b = b.gb;
                if (null !== b) {
        a = Gf(a, b, c);
                if (null !== a)
                return a;
                a = c.za(b);
                if (null !== a)
                return a
        }
        return null
        }
function Bf(a) {
if (null !== a.Dc) {
for (var b = a.h, c = a.Dc.k; c.next(); ) {
var d = c.key;
        d.Jd() && (d.location = c.value.point)
        }
for (c = a.Dc.k; c.next(); )
        if (d = c.key, d instanceof V && d.Vp) {
var f = c.value.point;
        a.Dc.add(d, tf());
        d.pl( - f.x, - f.y)
        }
b.zg()
        }
}
df.prototype.computeMove = function(a, b, c, d) {
void 0 === d && (d = new w);
        d.assign(b);
        if (null === a)
        return d;
        void 0 === c && (c = null);
        var f = b;
        if (this.pp && (this.bF || null === c || this.h.R.lj) && (f = t.K(), c = f, c.assign(b), null !== a)) {
var g = this.h;
        if (null !== g) {
var h = g.kp, k = this.lA, g = k.width, k = k.height, l = this.LE, m = l.x, l = l.y, n = this.KE;
        if (null !== h) {
var p = h.gt;
        isNaN(g) && (g = p.width);
        isNaN(k) && (k = p.height);
        h = h.kA;
        isNaN(m) && (m = h.x);
        isNaN(l) && (l = h.y)
        }
h = t.lc(0, 0);
        h.Ot(0, 0, g, k, n);
        H.ct(b.x, b.y, m + h.x, l + h.y, g, k, c);
        t.B(h)
        }
}
c = null !== a.aA ?
        a.aA(a, b, f) : f;
        k = a.yF;
        g = k.x;
        isNaN(g) && (g = a.location.x);
        k = k.y;
        isNaN(k) && (k = a.location.y);
        h = a.sF;
        m = h.x;
        isNaN(m) && (m = a.location.x);
        h = h.y;
        isNaN(h) && (h = a.location.y);
        d.p(Math.max(g, Math.min(c.x, m)), Math.max(k, Math.min(c.y, h)));
        f !== b && t.B(f);
        return d
        };
        function Hf(a, b) {
        if (null === b)
                return!0;
                var c = b.S;
                return null === c || c instanceof Ke || c.layer.yc || a.Dc && a.Dc.contains(c) || a.md && a.md.contains(c) ? !0 : !1
        }
function If(a, b, c, d) {
var f = a.h;
        if (null !== f) {
a.Zh && (null !== a.Kc && (a.Kc.aa = null, a.Kc.ca = null), Tf(a, !1));
        var g = !1;
        !1 === a.Gv && (g = f.Wa, f.Wa = !0);
        var h = !1, k = Uf(f, b, null, function(b) {
        return!Hf(a, b)
                }), l = f.R;
        l.ae = k;
        var m = f.Wa;
        f.Wa = !0;
        if (k !== a.Ll) {
var n = a.Ll;
        a.wv = n;
        for (a.Ll = k; null !== n; ) {
var p = n.DA;
        if (null !== p) {
if (k === n)
        break;
        if (null !== k && k.dj(n))
        break;
        p(l, n, k);
        h = !0;
        if (l.Ee)
        break
        }
n = n.ia
        }
n = a.wv;
        if (!a.ha && null === gf)
        return;
        for (; null !== k; ) {
p = k.zF;
        if (null !== p) {
if (n === k)
        break;
        if (null !== n && n.dj(k))
        break;
        p(l, k, n);
        h = !0;
        if (l.Ee)
        break
        }
k = k.ia
        }
k = a.Ll;
        if (!a.ha && null === gf)
        return
        }
null === k && (p = f.AF, null !== p && (p(l), h = !0));
        if (a.ha || null !== gf)
        if (a.doDragOver(b, k), a.ha || null !== gf)
        f.Wa = m, h && f.zg(), !1 === a.Gv && (f.Wa = g), (f.nf || f.of) && (c || d) && Vf(f, l.Ke)
        }
}
function Wf(a, b, c) {
var d = a.Ji;
        if (null === d)
        return null;
        var f = a.h.Pm(b, d.MA, function(a) {
        return d.findValidLinkablePort(a, c)
                });
        a = t.K();
        for (var g = Infinity, h = null, f = f.k; f.next(); ) {
var k = f.value;
        if (null !== k.S) {
var l = k.qb(Kb, a), l = b.Zj(l);
        l < g && (h = k, g = l)
        }
}
t.B(a);
        return h
        }
function Tf(a, b) {
var c = a.Kc;
        if (null !== c && !(2 > c.oa)) {
var d = a.h;
        if (null !== d && !d.ab && (d = a.Ji, null !== d)) {
var f = null, g = null;
        null === c.aa && (f = Wf(a, c.o(0), !1), null !== f && (g = f.S));
        var h = null, k = null;
        null === c.ca && (h = Wf(a, c.o(c.oa - 1), !0), null !== h && (k = h.S));
        if ((null === g || g instanceof S) && (null === k || k instanceof S)) {
var l = d.isValidLink(g, f, k, h);
        b ? (c.Fn = c.o(0).copy(), c.Jn = c.o(c.oa - 1).copy(), c.Vp = !1, c.aa = g, null !== f && (c.Of = f.Ld), c.ca = k, null !== h && (c.Mg = h.Ld)) : l ? Xf(d, g, f, k, h) : Xf(d, null, null, null, null)
        }
}
}
}
df.prototype.doDragOver = function() {
};
        function Yf(a, b) {
        var c = a.h;
                if (null !== c && null !== c.ba) {
        a.Zh && Tf(a, !0);
                vf(a);
                var d = Uf(c, b, null, function(b) {
                return!Hf(a, b)
                }), f = c.R;
                f.ae = d;
                if (null !== d)
                for (var g = d; null !== g; ) {
        var h = g.vt;
                if (null !== h && (h(f, g), f.Ee))
                break;
                g = g.ia
        }
        else
                h = c.vt, null !== h && h(f);
                if (a.ha || null !== gf)
                if (a.doDropOnto(b, d), a.ha || null !== gf)
                for (d = c.selection.k; d.next(); )
                f = d.value, f instanceof S && Zf(c, f.pa)
        }
        }
df.prototype.doDropOnto = function() {
};
        df.prototype.doMouseMove = function() {
        if (this.ha) {
        var a = this.h;
                if (null !== a && null !== this.Xo && null !== this.Dc) {
        var b = !1, c = !1;
                this.mayCopy() ? (b = !0, a.$b = "copy", Ef(this, !1), Ff(this, this.md, !1)) : this.mayMove() ? (c = !0, a.$b = "default", zf(this), Ff(this, this.Dc, !0)) : this.mayDragOut() ? (a.$b = "no-drop", Ef(this, !1), Ff(this, this.md, !1)) : zf(this);
                If(this, a.R.ea, c, b)
                }
        }
        };
        df.prototype.doMouseUp = function() {
        if (this.ha) {
        this.Hq = !0;
                var a = this.h;
                if (null !== a) {
        var b = !1, c = this.mayCopy();
                c && null !== this.md ? (zf(this), Ef(this, !0), Ff(this, this.md, !1), null !== this.md && a.dG(this.md.Dl())) : (b = !0, zf(this), this.mayMove() && (Ff(this, this.Dc, !0), this.Gv = !1, If(this, a.R.ea, !0, !1), this.Gv = !0));
                Yf(this, a.R.ea);
                if (this.ha) {
        this.md = null;
                if (b && null !== this.Dc)
                for (b = this.Dc.k; b.next(); ) {
        var d = b.key;
                d instanceof S && (d = d.gb, null === d || null === d.placeholder || this.Dc.contains(d) || d.Vz && d.fa())
                }
        a.Mc();
                wf(this, this.Dc);
                this.ff = c ? "Copy" : "Move";
                a.Ba(c ? "SelectionCopied" : "SelectionMoved", a.selection)
                }
        this.stopTool()
                }
        }
        };
        df.prototype.mayCopy = function() {
        if (!this.qA)
                return!1;
                var a = this.h;
                if (null === a || a.ab || a.Ze || !a.ym || !a.Ri || (t.Um ? !a.R.alt : !a.R.control))
                return!1;
                for (a = a.selection.k; a.next(); ) {
        var b = a.value;
                if (b.Jd() && b.canCopy())
                return!0
                }
        return null !== this.Kc && this.Zh && this.Kc.canCopy() ? !0 : !1
                };
        df.prototype.mayDragOut = function() {
        if (!this.qA)
                return!1;
                var a = this.h;
                if (null === a || !a.Ms || !a.Ri || a.Sj)
                return!1;
                for (a = a.selection.k; a.next(); ) {
        var b = a.value;
                if (b.Jd() && b.canCopy())
                return!0
                }
        return null !== this.Kc && this.Zh && this.Kc.canCopy() ? !0 : !1
                };
        df.prototype.mayMove = function() {
        var a = this.h;
                if (null === a || a.ab || !a.Sj)
                return!1;
                for (a = a.selection.k; a.next(); ) {
        var b = a.value;
                if (b.Jd() && b.canMove())
                return!0
                }
        return null !== this.Kc && this.Zh && this.Kc.canMove() ? !0 : !1
                };
        var xf = new B(df), gf = null, hf = null;
        df.prototype.mayDragIn = function() {
        var a = this.h;
                return null === a || !a.Kz || a.ab || a.Ze || !a.ym || null === a.ba ? !1 : !0
                };
        df.prototype.doSimulatedDragEnter = function() {
        if (this.mayDragIn()) {
        var a = gf;
                null !== a && (a.h.$b = "copy")
                }
        };
        df.prototype.doSimulatedDragLeave = function() {
        var a = gf;
                null !== a && a.doSimulatedDragOut();
                this.doCancel()
                };
        df.prototype.doSimulatedDragOver = function() {
        var a = this.h;
                if (null !== a) {
        var b = gf;
                null !== b && null !== b.Dc && this.mayDragIn() && (a.$b = "copy", $f(this, b.Dc.Dl(), !1), Ff(this, this.md, !1), If(this, a.R.ea, !1, !0))
                }
        };
        df.prototype.doSimulatedDrop = function() {
        var a = this.h;
                if (null !== a) {
        var b = gf;
                null !== b && (b.Hq = !0, zf(this), this.mayDragIn() && (this.tc("Drop"), $f(this, b.Dc.Dl(), !0), Ff(this, this.md, !1), null !== this.md && a.dG(this.md.Dl()), this.ff = "ExternalCopy", Yf(this, a.R.ea), a.Mc(), this.md = null, a.Ba("ExternalObjectsDropped", a.selection), this.gk()))
                }
        };
        function $f(a, b, c) {
        if (null === a.md) {
        var d = a.h;
                if (null !== d && !d.ab && !d.Ze && null !== d.ba) {
        d.Wa = !c;
                d.un = !c;
                a.ij = d.R.ea;
                d = d.Im(b, d, !0);
                c = t.Df();
                Df(b, c);
                var f = c.x + c.width / 2, g = c.y + c.height / 2;
                t.hc(c);
                var h = a.Iv;
                c = new ja(E, Object);
                var k = t.K();
                for (b = b.k; b.next(); ) {
        var l = b.value;
                if (l.Jd() && l.canCopy()) {
        var m = l.location, l = d.za(l);
                k.p(h.x - (f - m.x), h.y - (g - m.y));
                l.location = k;
                l.rf();
                c.add(l, tf(k))
        }
        }
        t.B(k);
                for (d = d.k; d.next(); )
                f = d.value, f instanceof V && f.canCopy() && c.add(f, tf());
                a.md = c;
                ef(a, c.Dl());
                null !== a.Kc && (c = a.Kc,
                        d = c.uj(), c.pl(a.ij.x - (d.x + d.width / 2), a.ij.y - (d.y + d.height / 2)))
        }
        }
        }
df.prototype.doSimulatedDragOut = function() {
var a = this.h;
        null !== a && (this.mayCopy() || this.mayMove() ? a.$b = "" : a.$b = "no-drop")
        };
        function ag() {
        0 < arguments.length && t.$c(ag);
                be.call(this);
                this.XC = 100;
                this.wC = !1;
                var a = new V, b = new W;
                b.ej = !0;
                b.stroke = "blue";
                a.add(b);
                b = new W;
                b.on = "Standard";
                b.fill = "blue";
                b.stroke = "blue";
                a.add(b);
                a.af = "Tool";
                this.rD = a;
                a = new S;
                b = new W;
                b.Ld = "";
                b.zb = "Rectangle";
                b.fill = null;
                b.stroke = "magenta";
                b.fb = 2;
                b.Ca = H.Rx;
                a.add(b);
                a.vl = !1;
                a.af = "Tool";
                this.pD = a;
                this.qD = b;
                a = new S;
                b = new W;
                b.Ld = "";
                b.zb = "Rectangle";
                b.fill = null;
                b.stroke = "magenta";
                b.fb = 2;
                b.Ca = H.Rx;
                a.add(b);
                a.vl = !1;
                a.af = "Tool";
                this.sD = a;
                this.tD = b;
                this.VC =
                this.UC = this.QC = this.PC = this.RC = null;
                this.sC = !0;
                this.vH = new ja(Q, "boolean");
                this.YC = this.Kk = this.lD = null
        }
t.ga("LinkingBaseTool", ag);
        t.Ka(ag, be);
        ag.prototype.doStop = function() {
        var a = this.h;
                null !== a && uf(a);
                this.Ig = this.Hg = this.Gg = this.Fg = this.qc = null;
                this.zx.clear();
                this.Cf = null
                };
        t.g(ag, "portGravity", ag.prototype.MA);
        t.defineProperty(ag, {MA: "portGravity"}, function() {
        return this.XC
                }, function(a) {
        t.i(a, "number", ag, "portGravity");
                0 <= a && (this.XC = a)
                });
        t.g(ag, "isUnconnectedLinkValid", ag.prototype.Vm);
        t.defineProperty(ag, {Vm: "isUnconnectedLinkValid"}, function() {
        return this.wC
                }, function(a) {
        t.i(a, "boolean", ag, "isUnconnectedLinkValid");
                this.wC = a
                });
        t.g(ag, "temporaryLink", ag.prototype.Wf);
        t.defineProperty(ag, {Wf: "temporaryLink"}, function() {
        return this.rD
                }, function(a) {
        t.l(a, V, ag, "temporaryLink");
                this.rD = a
                });
        t.g(ag, "temporaryFromNode", ag.prototype.be);
        t.defineProperty(ag, {be: "temporaryFromNode"}, function() {
        return this.pD
                }, function(a) {
        t.l(a, S, ag, "temporaryFromNode");
                this.pD = a
                });
        t.g(ag, "temporaryFromPort", ag.prototype.Bl);
        t.defineProperty(ag, {Bl: "temporaryFromPort"}, function() {
        return this.qD
                }, function(a) {
        t.l(a, Q, ag, "temporaryFromPort");
                this.qD = a
                });
        t.g(ag, "temporaryToNode", ag.prototype.ce);
        t.defineProperty(ag, {ce: "temporaryToNode"}, function() {
        return this.sD
                }, function(a) {
        t.l(a, S, ag, "temporaryToNode");
                this.sD = a
                });
        t.g(ag, "temporaryToPort", ag.prototype.Cl);
        t.defineProperty(ag, {Cl: "temporaryToPort"}, function() {
        return this.tD
                }, function(a) {
        t.l(a, Q, ag, "temporaryToPort");
                this.tD = a
                });
        t.g(ag, "originalLink", ag.prototype.qc);
        t.defineProperty(ag, {qc: "originalLink"}, function() {
        return this.RC
                }, function(a) {
        null !== a && t.l(a, V, ag, "originalLink");
                this.RC = a
                });
        t.g(ag, "originalFromNode", ag.prototype.Fg);
        t.defineProperty(ag, {Fg: "originalFromNode"}, function() {
        return this.PC
                }, function(a) {
        null !== a && t.l(a, S, ag, "originalFromNode");
                this.PC = a
                });
        t.g(ag, "originalFromPort", ag.prototype.Gg);
        t.defineProperty(ag, {Gg: "originalFromPort"}, function() {
        return this.QC
                }, function(a) {
        null !== a && t.l(a, Q, ag, "originalFromPort");
                this.QC = a
                });
        t.g(ag, "originalToNode", ag.prototype.Hg);
        t.defineProperty(ag, {Hg: "originalToNode"}, function() {
        return this.UC
                }, function(a) {
        null !== a && t.l(a, S, ag, "originalToNode");
                this.UC = a
                });
        t.g(ag, "originalToPort", ag.prototype.Ig);
        t.defineProperty(ag, {Ig: "originalToPort"}, function() {
        return this.VC
                }, function(a) {
        null !== a && t.l(a, Q, ag, "originalToPort");
                this.VC = a
                });
        t.defineProperty(ag, {Vd: "isForwards"}, function() {
        return this.sC
                }, function(a) {
        t.i(a, "boolean", ag, "isForwards");
                this.sC = a
                });
        t.A(ag, {zx: "validPortsCache"}, function() {
        return this.vH
                });
        t.g(ag, "targetPort", ag.prototype.Cf);
        t.defineProperty(ag, {Cf: "targetPort"}, function() {
        return this.lD
                }, function(a) {
        null !== a && t.l(a, Q, ag, "targetPort");
                this.lD = a
                });
        ag.prototype.copyPortProperties = function(a, b, c, d, f) {
        if (null !== a && null !== b && null !== c && null !== d) {
        d.Ca = b.pa.size;
                f ? (d.tb = b.tb, d.ik = b.ik) : (d.pb = b.pb, d.ck = b.ck);
                c.bf = Kb;
                var g = t.K();
                c.location = b.qb(Kb, g);
                t.B(g);
                d.angle = b.gl();
                null !== this.Ft && this.Ft(a, b, c, d, f)
                }
        };
        ag.prototype.setNoTargetPortProperties = function(a, b, c) {
        null !== b && (b.Ca = H.Rx, b.pb = wb, b.tb = wb);
                null !== a && (a.location = this.h.R.ea);
                null !== this.Ft && this.Ft(null, null, a, b, c)
                };
        ag.prototype.doMouseDown = function() {
        this.ha && this.doMouseMove()
                };
        ag.prototype.doMouseMove = function() {
        if (this.ha) {
        var a = this.h;
                if (null !== a) {
        this.Cf = this.findTargetPort(this.Vd);
                if (null !== this.Cf) {
        var b = this.Cf.S;
                if (b instanceof S) {
        this.Vd ? this.copyPortProperties(b, this.Cf, this.ce, this.Cl, !0) : this.copyPortProperties(b, this.Cf, this.be, this.Bl, !1);
                return
                }
        }
        this.Vd ? this.setNoTargetPortProperties(this.ce, this.Cl, !0) : this.setNoTargetPortProperties(this.be, this.Bl, !1);
                (a.nf || a.of) && Vf(a, a.R.Ke)
                }
        }
        };
        ag.prototype.findValidLinkablePort = function(a, b) {
        if (null === a)
                return null;
                var c = a.S;
                if (!(c instanceof S))
                return null;
                for (; null !== a; ) {
        var d = b ? a.kB : a.hA;
                if (!0 === d && (null !== a.Ld || a instanceof S) && (b ? this.isValidTo(c, a) : this.isValidFrom(c, a)))
                return a;
                if (!1 === d)
                break;
                a = a.ia
                }
        return null
                };
        ag.prototype.findTargetPort = function(a) {
        var b = this.h, c = b.R.ea, d = this.MA;
                0 >= d && (d = 0.1);
                for (var f = this, g = b.Pm(c, d, function(b) {
                return f.findValidLinkablePort(b, a)
                        }, null, !0), d = Infinity, b = null, g = g.k; g.next(); ) {
        var h = g.value, k = h.S;
                if (k instanceof S) {
        var l = h.qb(Kb, t.K()), m = c.x - l.x, n = c.y - l.y;
                t.B(l);
                l = m * m + n * n;
                l < d && (m = this.zx.za(h), null !== m ? m && (b = h, d = l) : a && this.isValidLink(this.Fg, this.Gg, k, h) || !a && this.isValidLink(k, h, this.Hg, this.Ig) ? (this.zx.add(h, !0), b = h, d = l) : this.zx.add(h, !1))
                }
        }
        return null !== b && (c = b.S,
                c instanceof S && (null === c.layer || c.layer.zm)) ? b : null
                };
        ag.prototype.isValidFrom = function(a, b) {
        if (null === a || null === b)
                return this.Vm;
                if (this.h.Ua === this && (null !== a.layer && !a.layer.zm || !0 !== b.hA))
                return!1;
                var c = b.FE;
                if (Infinity > c) {
        if (null !== this.qc && a === this.Fg && b === this.Gg)
                return!0;
                var d = b.Ld;
                null === d && (d = "");
                if (a.yw(d).count >= c)
                return!1
                }
        return!0
                };
        ag.prototype.isValidTo = function(a, b) {
        if (null === a || null === b)
                return this.Vm;
                if (this.h.Ua === this && (null !== a.layer && !a.layer.zm || !0 !== b.kB))
                return!1;
                var c = b.zG;
                if (Infinity > c) {
        if (null !== this.qc && a === this.Hg && b === this.Ig)
                return!0;
                var d = b.Ld;
                null === d && (d = "");
                if (a.tg(d).count >= c)
                return!1
                }
        return!0
                };
        ag.prototype.isInSameNode = function(a, b) {
        if (null === a || null === b)
                return!1;
                if (a === b)
                return!0;
                var c = a.S, d = b.S;
                return null !== c && c === d
                };
        ag.prototype.isLinked = function(a, b) {
        if (null === a || null === b)
                return!1;
                var c = a.S;
                if (!(c instanceof S))
                return!1;
                var d = a.Ld;
                null === d && (d = "");
                var f = b.S;
                if (!(f instanceof S))
                return!1;
                var g = b.Ld;
                null === g && (g = "");
                for (f = f.tg(g); f.next(); )
                if (g = f.value, g.aa === c && g.Of === d)
                return!0;
                return!1
                };
        ag.prototype.isValidLink = function(a, b, c, d) {
        if (!this.isValidFrom(a, b) || !this.isValidTo(c, d) || !(null === b || null === d || (b.EE && d.yG || !this.isInSameNode(b, d)) && (b.DE && d.xG || !this.isLinked(b, d))) || null !== this.qc && (null !== a && bg(this, a, this.qc) || null !== c && bg(this, c, this.qc)) || null !== a && null !== c && (null === a.data && null !== c.data || null !== a.data && null === c.data) || !cg(this, a, c, this.qc))
                return!1;
                if (null !== a) {
        var f = a.zp;
                if (null !== f && !f(a, b, c, d, this.qc))
                return!1
                }
        if (null !== c && (f = c.zp, null !== f && !f(a, b, c, d, this.qc)))
                return!1;
                f = this.zp;
                return null !== f ? f(a, b, c, d, this.qc) : !0
                };
        function bg(a, b, c) {
        if (null === b)
                return!1;
                var d = b.Xd;
                if (null === d)
                return!1;
                if (d === c)
                return!0;
                var f = new C(S);
                f.add(b);
                return dg(a, d, c, f)
        }
function dg(a, b, c, d) {
if (b === c)
        return!0;
        var f = b.aa;
        if (null !== f && f.bi && (d.add(f), dg(a, f.Xd, c, d)))
        return!0;
        b = b.ca;
        return null !== b && b.bi && (d.add(b), dg(a, b.Xd, c, d)) ? !0 : !1
        }
function cg(a, b, c, d) {
if (null === b || null === c)
        return a.Vm;
        var f = a.h.NG;
        if (f !== eg) {
if (f === lg) {
if (null !== d && !d.Ec)
        return!0;
        for (f = c.re; f.next(); ) {
var g = f.value;
        if (g !== d && g.Ec && g.ca === c)
        return!1
        }
return!mg(a, b, c, d, !0)
        }
if (f === ng) {
if (null !== d && !d.Ec)
        return!0;
        for (f = b.re; f.next(); )
        if (g = f.value, g !== d && g.Ec && g.aa === b)
        return!1;
        return!mg(a, b, c, d, !0)
        }
if (f === og)
        return b === c ? a = !0 : (f = new C(S), f.add(c), a = pg(a, f, b, c, d)), !a;
        if (f === qg)
        return!mg(a, b, c, d, !1);
        if (f === rg)
        return b === c ? a = !0 : (f = new C(S), f.add(c), a = sg(a, f, b, c, d)),
        !a
        }
return!0
        }
function mg(a, b, c, d, f) {
if (b === c)
        return!0;
        if (null === b || null === c)
        return!1;
        for (var g = b.re; g.next(); ) {
var h = g.value;
        if (h !== d && (!f || h.Ec) && h.ca === b && (h = h.aa, h !== b && mg(a, h, c, d, f)))
        return!0
        }
return!1
        }
function pg(a, b, c, d, f) {
if (c === d)
        return!0;
        if (null === c || null === d || b.contains(c))
        return!1;
        b.add(c);
        for (var g = c.re; g.next(); ) {
var h = g.value;
        if (h !== f && h.ca === c && (h = h.aa, h !== c && pg(a, b, h, d, f)))
        return!0
        }
return!1
        }
function sg(a, b, c, d, f) {
if (c === d)
        return!0;
        if (null === c || null === d || b.contains(c))
        return!1;
        b.add(c);
        for (var g = c.re; g.next(); ) {
var h = g.value;
        if (h !== f) {
var k = h.aa, h = h.ca, k = k === c ? h : k;
        if (k !== c && sg(a, b, k, d, f))
        return!0
        }
}
return!1
        }
t.g(ag, "linkValidation", ag.prototype.zp);
        t.defineProperty(ag, {zp: "linkValidation"}, function() {
        return this.Kk
                }, function(a) {
        null !== a && t.i(a, "function", ag, "linkValidation");
                this.Kk = a
                });
        t.g(ag, "portTargeted", ag.prototype.Ft);
        t.defineProperty(ag, {Ft: "portTargeted"}, function() {
        return this.YC
                }, function(a) {
        null !== a && t.i(a, "function", ag, "portTargeted");
                this.YC = a
                });
        function pa() {
        0 < arguments.length && t.$c(pa);
                ag.call(this);
                this.name = "Linking";
                this.iy = {};
                this.hy = null;
                this.sa = tg;
                this.tz = this.hD = null
        }
t.ga("LinkingTool", pa);
        t.Ka(pa, ag);
        var tg;
        pa.Either = tg = t.w(pa, "Either", 0);
        var ug;
        pa.ForwardsOnly = ug = t.w(pa, "ForwardsOnly", 0);
        var vg;
        pa.BackwardsOnly = vg = t.w(pa, "BackwardsOnly", 0);
        t.g(pa, "archetypeLinkData", pa.prototype.KD);
        t.defineProperty(pa, {KD: "archetypeLinkData"}, function() {
        return this.iy
                }, function(a) {
        null !== a && t.l(a, Object, pa, "archetypeLinkData");
                a instanceof Q && t.l(a, V, pa, "archetypeLinkData");
                this.iy = a
                });
        t.g(pa, "archetypeLabelNodeData", pa.prototype.Oz);
        t.defineProperty(pa, {Oz: "archetypeLabelNodeData"}, function() {
        return this.hy
                }, function(a) {
        null !== a && t.l(a, Object, pa, "archetypeLabelNodeData");
                a instanceof Q && t.l(a, S, pa, "archetypeLabelNodeData");
                this.hy = a
                });
        t.g(pa, "direction", pa.prototype.direction);
        t.defineProperty(pa, {direction: "direction"}, function() {
        return this.sa
                }, function(a) {
        t.Aa(a, pa, pa, "direction");
                this.sa = a
                });
        t.g(pa, "startObject", pa.prototype.gB);
        t.defineProperty(pa, {gB: "startObject"}, function() {
        return this.hD
                }, function(a) {
        null !== a && t.l(a, Q, pa, "startObject");
                this.hD = a
                });
        t.A(pa, {vx: "startPort"}, function() {
        return this.tz
                });
        pa.prototype.canStart = function() {
        if (!this.isEnabled)
                return!1;
                var a = this.h;
                if (null === a || a.ab || a.Ze || !a.zm)
                return!1;
                var b = a.ba;
                return null !== b && (b instanceof P || b instanceof Ld) && a.R.left && (a.Ua === this || this.isBeyondDragSize()) ? null !== this.findLinkablePort() : !1
                };
        pa.prototype.findLinkablePort = function() {
        var a = this.h;
                if (null === a)
                return null;
                var b = this.gB;
                null === b && (b = a.ne(a.Lc.ea, null, null));
                if (null === b || !(b.S instanceof S))
                return null;
                var c = this.direction;
                if (c === tg || c === ug)
                if (a = this.findValidLinkablePort(b, !1), null !== a)
                return this.Vd = !0, a;
                if (c === tg || c === vg)
                if (a = this.findValidLinkablePort(b, !0), null !== a)
                return this.Vd = !1, a;
                return null
                };
        pa.prototype.doActivate = function() {
        var a = this.h;
                if (null !== a && (null === this.vx && (this.tz = this.findLinkablePort()), null !== this.vx)) {
        this.tc(this.name);
                a.Hd = !0;
                a.$b = "pointer";
                if (this.Vd) {
        this.Gg = this.vx;
                var b = this.Gg.S;
                b instanceof S && (this.Fg = b);
                this.copyPortProperties(this.Fg, this.Gg, this.be, this.Bl, !1)
                } else
                this.Ig = this.vx, b = this.Ig.S, b instanceof S && (this.Hg = b), this.copyPortProperties(this.Hg, this.Ig, this.ce, this.Cl, !0);
                a.add(this.be);
                a.add(this.ce);
                null !== this.Wf && (null !== this.be && (this.Wf.aa = this.be),
                        null !== this.ce && (this.Wf.ca = this.ce), this.Wf.ac(), a.add(this.Wf));
                this.ha = !0
                }
        };
        pa.prototype.doDeactivate = function() {
        this.ha = !1;
                var a = this.h;
                null !== a && (a.remove(this.Wf), a.remove(this.be), a.remove(this.ce), a.Hd = !1, a.$b = "", this.gk())
                };
        pa.prototype.doStop = function() {
        ag.prototype.doStop.call(this);
                this.gB = this.tz = null
                };
        pa.prototype.doMouseUp = function() {
        if (this.ha) {
        var a = this.h;
                if (null === a)
                return;
                var b = this.ff = null, c = null, d = null, f = null, g = this.Cf = this.findTargetPort(this.Vd), h = null;
                null !== g ? (h = g.S, h instanceof S && (this.Vd ? (null !== this.Fg && (b = this.Fg, c = this.Gg), d = h, f = g) : (b = h, c = g, null !== this.Hg && (d = this.Hg, f = this.Ig)))) : this.Vd ? null !== this.Fg && this.Vm && (b = this.Fg, c = this.Gg) : null !== this.Hg && this.Vm && (d = this.Hg, f = this.Ig);
                if (null !== b || null !== d)
                b = this.insertLink(b, c, d, f), null !== b ? (null === g && (this.Vd ? b.Jn = a.R.ea.copy() :
                b.Fn = a.R.ea.copy()), a.Pe && a.select(b), this.ff = this.name, a.Ba("LinkDrawn", b)) : a.ba.UD()
                }
        this.stopTool()
                };
        pa.prototype.insertLink = function(a, b, c, d) {
        var f = this.h;
                if (null === f)
                return null;
                var g = f.ba;
                if (null === g)
                return null;
                if (g instanceof Ld) {
        var h = a;
                b = c;
                f.pd || (h = c, b = a);
                if (null !== h && null !== b)
                return g.lh(b.data, g.Hb(h.data)), b.et()
                } else if (g instanceof P)
                if (h = "", null !== a && (null === b && (b = a), h = b.Ld, null === h && (h = "")), b = "", null !== c && (null === d && (d = c), b = d.Ld, null === b && (b = "")), d = this.KD, d instanceof V) {
        if (Me(d), g = d.copy(), g instanceof V)
                return g.aa = a, g.Of = h, g.ca = c, g.Mg = b, f.add(g), a = this.Oz, a instanceof S && (Me(a),
                a = a.copy(), a instanceof S && (a.Xd = g, f.add(a))), g
                } else if (null !== d && (d = g.eE(d), t.rb(d)))
                return null !== a && g.qx(d, g.Hb(a.data)), g.aB(d, h), null !== c && g.tx(d, g.Hb(c.data)), g.dB(d, b), g.Wv(d), a = this.Oz, null === a || a instanceof S || (a = g.copyNodeData(a), t.rb(a) && (g.xm(a), a = g.Hb(a), void 0 !== a && g.GD(d, a))), g = f.Nf(d);
                return null
                };
        function jf() {
        0 < arguments.length && t.$c(jf);
                ag.call(this);
                this.name = "Relinking";
                var a = new W;
                a.zb = "Diamond";
                a.Ca = H.Kx;
                a.fill = "lightblue";
                a.stroke = "dodgerblue";
                a.cursor = "pointer";
                a.Af = 0;
                this.hC = a;
                a = new W;
                a.zb = "Diamond";
                a.Ca = H.Kx;
                a.fill = "lightblue";
                a.stroke = "dodgerblue";
                a.cursor = "pointer";
                a.Af = - 1;
                this.uD = a;
                this.dc = null;
                this.SC = new x
        }
t.ga("RelinkingTool", jf);
        t.Ka(jf, ag);
        jf.prototype.updateAdornments = function(a) {
        if (null !== a && a instanceof V) {
        var b = "RelinkFrom", c = null;
                if (a.eb && !this.h.ab) {
        var d = a.Mt;
                null !== d && a.canRelinkFrom() && a.pa.N() && a.Sa() && d.pa.N() && d.ol() && (c = a.ap(b), null === c && (c = this.makeAdornment(d, !1), c.Wc = b, a.Vk(b, c)))
                }
        null === c && a.ul(b);
                b = "RelinkTo";
                c = null;
                a.eb && !this.h.ab && (d = a.Mt, null !== d && a.canRelinkTo() && a.pa.N() && a.Sa() && d.pa.N() && d.ol() && (c = a.ap(b), null === c && (c = this.makeAdornment(d, !0), c.Wc = b, a.Vk(b, c))));
                null === c && a.ul(b)
                }
        };
        jf.prototype.makeAdornment = function(a, b) {
        var c = new Ke;
                c.type = wg;
                var d = b ? this.ZJ : this.EI;
                null !== d && c.add(d.copy());
                c.pc = a;
                return c
                };
        t.defineProperty(jf, {EI: "fromHandleArchetype"}, function() {
        return this.hC
                }, function(a) {
        null !== a && t.l(a, Q, jf, "fromHandleArchetype");
                this.hC = a
                });
        t.defineProperty(jf, {ZJ: "toHandleArchetype"}, function() {
        return this.uD
                }, function(a) {
        null !== a && t.l(a, Q, jf, "toHandleArchetype");
                this.uD = a
                });
        t.A(jf, {handle: "handle"}, function() {
        return this.dc
                });
        jf.prototype.canStart = function() {
        if (!this.isEnabled)
                return!1;
                var a = this.h;
                if (null === a || a.ab || a.Ze || !a.Tj)
                return!1;
                var b = a.ba;
                if (null === b || !(b instanceof P || b instanceof Ld) || !a.R.left)
                return!1;
                b = this.findToolHandleAt(a.Lc.ea, "RelinkFrom");
                null === b && (b = this.findToolHandleAt(a.Lc.ea, "RelinkTo"));
                return null !== b
                };
        jf.prototype.doActivate = function() {
        var a = this.h;
                if (null !== a) {
        if (null === this.qc) {
        var b = this.findToolHandleAt(a.Lc.ea, "RelinkFrom");
                null === b && (b = this.findToolHandleAt(a.Lc.ea, "RelinkTo"));
                if (null === b)
                return;
                var c = b.S;
                if (!(c instanceof Ke && c.Wh instanceof V))
                return;
                this.dc = b;
                this.Vd = null === c || "RelinkTo" === c.Wc;
                this.qc = c.Wh
                }
        this.tc(this.name);
                a.Hd = !0;
                a.$b = "pointer";
                this.Gg = this.qc.ud;
                this.Fg = this.qc.aa;
                this.Ig = this.qc.de;
                this.Hg = this.qc.ca;
                this.SC.set(this.qc.pa);
                null !== this.qc && 0 < this.qc.oa && (null ===
                        this.qc.aa && (null !== this.Bl && (this.Bl.Ca = H.fq), null !== this.be && (this.be.location = this.qc.o(0))), null === this.qc.ca && (null !== this.Cl && (this.Cl.Ca = H.fq), null !== this.ce && (this.ce.location = this.qc.o(this.qc.oa - 1))));
                this.copyPortProperties(this.Fg, this.Gg, this.be, this.Bl, !1);
                this.copyPortProperties(this.Hg, this.Ig, this.ce, this.Cl, !0);
                a.add(this.be);
                a.add(this.ce);
                null !== this.Wf && (null !== this.be && (this.Wf.aa = this.be), null !== this.ce && (this.Wf.ca = this.ce), this.copyLinkProperties(this.qc, this.Wf), this.Wf.ac(),
                        a.add(this.Wf));
                this.ha = !0
                }
        };
        jf.prototype.copyLinkProperties = function(a, b) {
        if (null !== a && null !== b) {
        b.Lo = a.Lo;
                b.ow = a.ow;
                var c = a.De;
                if (c === xg || c === yg)
                c = zg;
                b.De = c;
                b.Ws = a.Ws;
                b.Jt = a.Jt;
                b.ln = a.ln;
                b.pb = a.pb;
                b.ck = a.ck;
                b.gp = a.gp;
                b.hp = a.hp;
                b.tb = a.tb;
                b.ik = a.ik;
                b.Wp = a.Wp;
                b.Xp = a.Xp
                }
        };
        jf.prototype.doDeactivate = function() {
        this.ha = !1;
                var a = this.h;
                null !== a && (a.remove(this.Wf), a.remove(this.be), a.remove(this.ce), a.Hd = !1, a.$b = "", this.gk())
                };
        jf.prototype.doStop = function() {
        ag.prototype.doStop.call(this);
                this.dc = null
                };
        jf.prototype.doMouseUp = function() {
        if (this.ha) {
        var a = this.h;
                if (null === a)
                return;
                this.ff = null;
                var b = this.Fg, c = this.Gg, d = this.Hg, f = this.Ig, g = this.qc;
                this.Cf = this.findTargetPort(this.Vd);
                if (null !== this.Cf) {
        var h = this.Cf.S;
                h instanceof S && (this.Vd ? (d = h, f = this.Cf) : (b = h, c = this.Cf))
                } else
                this.Vm ? this.Vd ? f = d = null : c = b = null : g = null;
                null !== g && (this.reconnectLink(g, this.Vd ? d : b, this.Vd ? f : c, this.Vd), null === this.Cf && (this.Vd ? g.Jn = a.R.ea.copy() : g.Fn = a.R.ea.copy(), g.ac()), a.Pe && (g.eb = !0), this.ff = this.name, a.Ba("LinkRelinked",
                        g, this.Vd ? this.Ig : this.Gg));
                Ag(this.qc, this.SC)
                }
        this.stopTool()
                };
        jf.prototype.reconnectLink = function(a, b, c, d) {
        if (null === this.h)
                return!1;
                c = null !== c && null !== c.Ld ? c.Ld : "";
                d ? (a.ca = b, a.Mg = c) : (a.aa = b, a.Of = c);
                return!0
                };
        function Xf(a, b, c, d, f) {
        null !== b ? (a.copyPortProperties(b, c, a.be, a.Bl, !1), a.h.add(a.be)) : a.h.remove(a.be);
                null !== d ? (a.copyPortProperties(d, f, a.ce, a.Cl, !0), a.h.add(a.ce)) : a.h.remove(a.ce)
        }
function Ig() {
0 < arguments.length && t.$c(Ig);
        be.call(this);
        this.name = "LinkReshaping";
        var a = new W;
        a.zb = "Rectangle";
        a.Ca = H.cq;
        a.fill = "lightblue";
        a.stroke = "dodgerblue";
        this.Ek = a;
        a = new W;
        a.zb = "Diamond";
        a.Ca = H.cq;
        a.fill = "lightblue";
        a.stroke = "dodgerblue";
        this.DC = a;
        this.ZC = 3;
        this.ey = this.dc = null;
        this.TC = new w;
        this.kz = null
        }
t.ga("LinkReshapingTool", Ig);
        t.Ka(Ig, be);
        var Kg;
        Ig.None = Kg = t.w(Ig, "None", 0);
        var Lg;
        Ig.Horizontal = Lg = t.w(Ig, "Horizontal", 1);
        var Mg;
        Ig.Vertical = Mg = t.w(Ig, "Vertical", 2);
        var Ng;
        Ig.All = Ng = t.w(Ig, "All", 3);
        function Og(a, b) {
        t.l(a, Q, Ig, "setReshapingBehavior:obj");
                t.Aa(b, Ig, Ig, "setReshapingBehavior:behavior");
                a.xv = b
        }
Ig.prototype.updateAdornments = function(a) {
if (null !== a && a instanceof V) {
if (a.eb && !this.h.ab) {
var b = a.path;
        if (null !== b && a.canReshape() && a.pa.N() && a.Sa() && b.pa.N() && b.ol()) {
var c = a.ap(this.name);
        if (null === c || c.oH !== a.oa || c.xH !== a.Jp)
        c = this.makeAdornment(b), c.oH = a.oa, c.xH = a.Jp, a.Vk(this.name, c);
        if (null !== c) {
c.location = a.position;
        return
        }
}
}
a.ul(this.name)
        }
};
        Ig.prototype.makeAdornment = function(a) {
        var b = a.S, c = b.oa, d = b.ic, f = null;
                if (null !== b.points && 1 < c) {
        f = new Ke;
                f.type = wg;
                var c = b.ft, g = b.Sw, h = d ? 1 : 0;
                if (b.Jp && b.De !== Pg)
                for (var k = c + h; k < g - h; k++) {
        var l = this.makeResegmentHandle(a, k);
                null !== l && (l.Af = k, l.Kt = 0.5, f.add(l))
                }
        for (k = c + 1; k < g; k++)
                if (l = this.makeHandle(a, k), null !== l) {
        l.Af = k;
                if (k !== c)
                if (k === c + 1 && d) {
        var h = b.o(c), m = b.o(c + 1);
                H.I(h.x, m.x) && H.I(h.y, m.y) && (m = b.o(c - 1));
                H.I(h.x, m.x) ? (Og(l, Mg), l.cursor = "n-resize") : H.I(h.y, m.y) && (Og(l, Lg), l.cursor = "w-resize")
                } else
                k ===
                g - 1 && d ? (h = b.o(g - 1), m = b.o(g), H.I(h.x, m.x) && H.I(h.y, m.y) && (h = b.o(g + 1)), H.I(h.x, m.x) ? (Og(l, Mg), l.cursor = "n-resize") : H.I(h.y, m.y) && (Og(l, Lg), l.cursor = "w-resize")) : k !== g && (Og(l, Ng), l.cursor = "move");
                f.add(l)
                }
        f.Wc = this.name;
                f.pc = a
                }
        return f
                };
        Ig.prototype.makeHandle = function() {
        var a = this.ht;
                return null === a ? null : a.copy()
                };
        t.defineProperty(Ig, {ht: "handleArchetype"}, function() {
        return this.Ek
                }, function(a) {
        null !== a && t.l(a, Q, Ig, "handleArchetype");
                this.Ek = a
                });
        Ig.prototype.makeResegmentHandle = function() {
        var a = this.lJ;
                return null === a ? null : a.copy()
                };
        t.defineProperty(Ig, {lJ: "midHandleArchetype"}, function() {
        return this.DC
                }, function(a) {
        null !== a && t.l(a, Q, Ig, "midHandleArchetype");
                this.DC = a
                });
        t.A(Ig, {handle: "handle"}, function() {
        return this.dc
                });
        t.A(Ig, {Ls: "adornedLink"}, function() {
        return this.ey
                });
        Ig.prototype.canStart = function() {
        if (!this.isEnabled)
                return!1;
                var a = this.h;
                return null !== a && !a.ab && a.No && a.R.left ? null !== this.findToolHandleAt(a.Lc.ea, this.name) : !1
                };
        Ig.prototype.doActivate = function() {
        var a = this.h;
                if (null !== a && (this.dc = this.findToolHandleAt(a.Lc.ea, this.name), null !== this.dc)) {
        var b = this.dc.S.Wh;
                if (b instanceof V) {
        this.ey = b;
                a.Hd = !0;
                this.tc(this.name);
                if (b.Jp && 0.5 === this.dc.Kt) {
        var c = b.points.copy(), d = this.dc.qb(Kb);
                c.Gd(this.dc.Af + 1, d);
                b.ic && c.Gd(this.dc.Af + 1, d);
                b.points = c;
                b.Mf();
                b.updateAdornments();
                this.dc = this.findToolHandleAt(a.Lc.ea, this.name)
                }
        this.TC = b.o(this.dc.Af);
                this.kz = b.points.copy();
                this.ha = !0
                }
        }
        };
        Ig.prototype.doDeactivate = function() {
        this.gk();
                this.ey = this.dc = null;
                var a = this.h;
                null !== a && (a.Hd = !1);
                this.ha = !1
                };
        Ig.prototype.doCancel = function() {
        var a = this.Ls;
                null !== a && (a.points = this.kz);
                this.stopTool()
                };
        Ig.prototype.doMouseMove = function() {
        var a = this.h;
                this.ha && null !== a && (a = this.computeReshape(a.R.ea), this.reshape(a))
                };
        Ig.prototype.doMouseUp = function() {
        var a = this.h;
                if (this.ha && null !== a) {
        var b = this.computeReshape(a.R.ea);
                this.reshape(b);
                b = this.Ls;
                if (null !== b && b.Jp) {
        var c = this.handle.Af, d = b.o(c - 1), f = b.o(c), g = b.o(c + 1);
                if (b.ic) {
        if (c > b.ft + 1 && c < b.Sw - 1) {
        var h = b.o(c - 2);
                if (Math.abs(d.x - f.x) < this.Jg && Math.abs(d.y - f.y) < this.Jg && (Qg(this, h, d, f, g, !0) || Qg(this, h, d, f, g, !1))) {
        var k = b.points.copy();
                Qg(this, h, d, f, g, !0) ? (k.Kg(c - 2, new w(h.x, (g.y + h.y) / 2)), k.Kg(c + 1, new w(g.x, (g.y + h.y) / 2))) : (k.Kg(c - 2, new w((g.x + h.x) / 2, h.y)), k.Kg(c + 1,
                new w((g.x + h.x) / 2, g.y)));
                k.qd(c);
                k.qd(c - 1);
                b.points = k;
                b.Mf();
                b.updateAdornments()
                } else
                h = b.o(c + 2), Math.abs(f.x - g.x) < this.Jg && Math.abs(f.y - g.y) < this.Jg && (Qg(this, d, f, g, h, !0) || Qg(this, d, f, g, h, !1)) && (k = b.points.copy(), Qg(this, d, f, g, h, !0) ? (k.Kg(c - 1, new w(d.x, (d.y + h.y) / 2)), k.Kg(c + 2, new w(h.x, (d.y + h.y) / 2))) : (k.Kg(c - 1, new w((d.x + h.x) / 2, d.y)), k.Kg(c + 2, new w((d.x + h.x) / 2, h.y))), k.qd(c + 1), k.qd(c), b.points = k, b.Mf(), b.updateAdornments())
                }
        } else
                h = t.K(), H.cn(d.x, d.y, g.x, g.y, f.x, f.y, h) && h.Zj(f) < this.Jg * this.Jg &&
                (k = b.points.copy(), k.qd(c), b.points = k, b.Mf(), b.updateAdornments()), t.B(h)
                }
        a.Mc();
                this.ff = this.name;
                a.Ba("LinkReshaped", this.Ls)
                }
        this.stopTool()
                };
        function Qg(a, b, c, d, f, g) {
        return g ? Math.abs(b.y - c.y) < a.Jg && Math.abs(c.y - d.y) < a.Jg && Math.abs(d.y - f.y) < a.Jg : Math.abs(b.x - c.x) < a.Jg && Math.abs(c.x - d.x) < a.Jg && Math.abs(d.x - f.x) < a.Jg
        }
t.g(Ig, "resegmentingDistance", Ig.prototype.Jg);
        t.defineProperty(Ig, {Jg: "resegmentingDistance"}, function() {
        return this.ZC
                }, function(a) {
        t.i(a, "number", Ig, "resegmentingDistance");
                this.ZC = a
                });
        Ig.prototype.reshape = function(a) {
        var b = this.Ls;
                b.yl();
                var c = this.handle.Af, d = this.handle && this.handle.xv ? this.handle.xv : Kg;
                if (b.ic)
                if (c === b.ft + 1)
                c = b.ft + 1, d === Mg ? (b.Y(c, b.o(c - 1).x, a.y), b.Y(c + 1, b.o(c + 2).x, a.y)) : d === Lg && (b.Y(c, a.x, b.o(c - 1).y), b.Y(c + 1, a.x, b.o(c + 2).y));
                else if (c === b.Sw - 1)
                c = b.Sw - 1, d === Mg ? (b.Y(c - 1, b.o(c - 2).x, a.y), b.Y(c, b.o(c + 1).x, a.y)) : d === Lg && (b.Y(c - 1, a.x, b.o(c - 2).y), b.Y(c, a.x, b.o(c + 1).y));
                else {
                var d = c, f = b.o(d), g = b.o(d - 1), h = b.o(d + 1);
                        H.I(g.x, f.x) && H.I(f.y, h.y) ? (H.I(g.x, b.o(d - 2).x) && !H.I(g.y,
                        b.o(d - 2).y) ? (b.C(d, a.x, g.y), c++, d++) : b.Y(d - 1, a.x, g.y), H.I(h.y, b.o(d + 2).y) && !H.I(h.x, b.o(d + 2).x) ? b.C(d + 1, h.x, a.y) : b.Y(d + 1, h.x, a.y)) : H.I(g.y, f.y) && H.I(f.x, h.x) ? (H.I(g.y, b.o(d - 2).y) && !H.I(g.x, b.o(d - 2).x) ? (b.C(d, g.x, a.y), c++, d++) : b.Y(d - 1, g.x, a.y), H.I(h.x, b.o(d + 2).x) && !H.I(h.y, b.o(d + 2).y) ? b.C(d + 1, a.x, h.y) : b.Y(d + 1, a.x, h.y)) : H.I(g.x, f.x) && H.I(f.x, h.x) ? (H.I(g.x, b.o(d - 2).x) && !H.I(g.y, b.o(d - 2).y) ? (b.C(d, a.x, g.y), c++, d++) : b.Y(d - 1, a.x, g.y), H.I(h.x, b.o(d + 2).x) && !H.I(h.y, b.o(d + 2).y) ? b.C(d + 1, a.x, h.y) : b.Y(d + 1, a.x,
                        h.y)) : H.I(g.y, f.y) && H.I(f.y, h.y) && (H.I(g.y, b.o(d - 2).y) && !H.I(g.x, b.o(d - 2).x) ? (b.C(d, g.x, a.y), c++, d++) : b.Y(d - 1, g.x, a.y), H.I(h.y, b.o(d + 2).y) && !H.I(h.x, b.o(d + 2).x) ? b.C(d + 1, h.x, a.y) : b.Y(d + 1, h.x, a.y));
                        b.Y(c, a.x, a.y)
                        }
        else
                b.Y(c, a.x, a.y), 1 === c && b.computeSpot(!0).Ge() && (f = b.aa, g = b.ud, null === f || f.Sa() || (f = f.findVisibleNode(), f !== b.aa && (g = f.fl(""))), d = g.qb(Kb, t.K()), f = b.getLinkPointFromPoint(f, g, d, a, !0, t.K()), b.Y(0, f.x, f.y), t.B(d), t.B(f)), c === b.oa - 2 && b.computeSpot(!1).Ge() && (c = b.ca, f = b.de, null === c || c.Sa() ||
                (c = c.findVisibleNode(), c !== b.ca && (f = c.fl(""))), d = f.qb(Kb, t.K()), f = b.getLinkPointFromPoint(c, f, d, a, !1, t.K()), b.Y(b.oa - 1, f.x, f.y), t.B(d), t.B(f));
                b.Vi()
                };
        Ig.prototype.computeReshape = function(a) {
        var b = this.Ls, c = this.handle.Af;
                switch (this.handle && this.handle.xv ? this.handle.xv : Kg) {
        case Ng:
                return a;
                case Mg:
                return b = b.o(c), new w(b.x, a.y);
                case Lg:
                return b = b.o(c), new w(a.x, b.y);
                default:
                case Kg:
                return b.o(c)
                }
        };
        t.g(Ig, "originalPoint", Ig.prototype.vJ);
        t.A(Ig, {vJ: "originalPoint"}, function() {
        return this.TC
                });
        t.g(Ig, "originalPoints", Ig.prototype.wJ);
        t.A(Ig, {wJ: "originalPoints"}, function() {
        return this.kz
                });
        function Rg() {
        0 < arguments.length && t.$c(Rg);
                be.call(this);
                this.name = "Resizing";
                this.Fj = (new ga(1, 1)).freeze();
                this.Ej = (new ga(9999, 9999)).freeze();
                this.pj = (new ga(NaN, NaN)).freeze();
                this.Vq = !1;
                this.ib = null;
                var a = new W;
                a.Rj = Kb;
                a.zb = "Rectangle";
                a.Ca = H.cq;
                a.fill = "lightblue";
                a.stroke = "dodgerblue";
                a.fb = 1;
                a.cursor = "pointer";
                this.Ek = a;
                this.dc = null;
                this.sv = new ga;
                this.jz = new w;
                this.Ny = new ga(0, 0);
                this.My = new ga(Infinity, Infinity);
                this.Ly = new ga(1, 1);
                this.MC = !0
        }
t.ga("ResizingTool", Rg);
        t.Ka(Rg, be);
        Rg.prototype.updateAdornments = function(a) {
        if (!(null === a || a instanceof V)) {
        if (a.eb && !this.h.ab) {
        var b = a.TF;
                if (null !== b && a.canResize() && a.pa.N() && a.Sa() && b.pa.N() && b.ol()) {
        var c = a.ap(this.name);
                null === c && (c = this.makeAdornment(b));
                if (null !== c) {
        var d = b.gl();
                c.angle = d;
                var f = b.qb(c.bf, t.K()), g = b.dk();
                c.location = f;
                t.B(f);
                f = c.placeholder;
                if (null !== f) {
        var b = b.Qa, h = t.Al();
                h.p(b.width * g, b.height * g);
                f.Ca = h;
                t.bk(h)
                }
        Sg(this, c, d);
                a.Vk(this.name, c);
                return
                }
        }
        }
        a.ul(this.name)
                }
        };
        Rg.prototype.makeAdornment = function(a) {
        var b = null, b = a.S.RF;
                if (null === b) {
        b = new Ke;
                b.type = Tg;
                b.bf = Kb;
                var c = new Ug;
                c.ej = !0;
                b.add(c);
                b.add(this.makeHandle(a, Eb));
                b.add(this.makeHandle(a, Gb));
                b.add(this.makeHandle(a, Pb));
                b.add(this.makeHandle(a, Lb));
                b.add(this.makeHandle(a, Tb));
                b.add(this.makeHandle(a, Vb));
                b.add(this.makeHandle(a, Wb));
                b.add(this.makeHandle(a, Ub))
                } else if (Me(b), b = b.copy(), !(b instanceof Ke))
                return null;
                b.Wc = this.name;
                b.pc = a;
                return b
                };
        Rg.prototype.makeHandle = function(a, b) {
        var c = this.ht;
                if (null === c)
                return null;
                c = c.copy();
                c.alignment = b;
                return c
                };
        function Sg(a, b, c) {
        if (null !== b)
                if (!b.alignment.Nc() && "" !== b.cursor)
                a:{
                a = b.alignment;
                        a.Ge() && (a = Kb);
                        if (0 >= a.x)
                        c = 0 >= a.y ? c + 225 : 1 <= a.y ? c + 135 : c + 180;
                        else if (1 <= a.x)
                        0 >= a.y ? c += 315 : 1 <= a.y && (c += 45);
                        else if (0 >= a.y)
                        c += 270;
                        else if (1 <= a.y)
                        c += 90;
                        else
                        break a;
                        0 > c ? c += 360 : 360 <= c && (c -= 360);
                        b.cursor = 22.5 > c ? "e-resize" : 67.5 > c ? "se-resize" : 112.5 > c ? "s-resize" : 157.5 > c ? "sw-resize" : 202.5 > c ? "w-resize" : 247.5 > c ? "nw-resize" : 292.5 > c ? "n-resize" : 337.5 > c ? "ne-resize" : "e-resize"
                }
        else if (b instanceof y)
                for (b = b.elements; b.next(); )
                Sg(a,
                        b.value, c)
        }
t.defineProperty(Rg, {ht: "handleArchetype"}, function() {
return this.Ek
        }, function(a) {
null !== a && t.l(a, Q, Rg, "handleArchetype");
        this.Ek = a
        });
        t.A(Rg, {handle: "handle"}, function() {
        return this.dc
                });
        t.defineProperty(Rg, {pc: "adornedObject"}, function() {
        return this.ib
                }, function(a) {
        null !== a && t.l(a, Q, Rg, "adornedObject");
                this.ib = a
                });
        Rg.prototype.canStart = function() {
        if (!this.isEnabled)
                return!1;
                var a = this.h;
                return null !== a && !a.ab && a.Oo && a.R.left ? null !== this.findToolHandleAt(a.Lc.ea, this.name) ? !0 : !1 : !1
                };
        Rg.prototype.doActivate = function() {
        var a = this.h;
                null !== a && (this.dc = this.findToolHandleAt(a.Lc.ea, this.name), null !== this.dc && (this.ib = this.dc.S.pc, this.jz.set(this.ib.S.location), this.sv.set(this.ib.Ca), this.Ly = this.computeCellSize(), this.Ny = this.computeMinSize(), this.My = this.computeMaxSize(), a.Hd = !0, this.MC = a.Zb.isEnabled, a.Zb.isEnabled = !1, this.tc(this.name), this.ha = !0))
                };
        Rg.prototype.doDeactivate = function() {
        var a = this.h;
                null !== a && (this.gk(), this.ib = this.dc = null, this.ha = a.Hd = !1, a.Zb.isEnabled = this.MC)
                };
        Rg.prototype.doCancel = function() {
        this.ib.Ca = this.sv;
                this.ib.S.location = this.jz;
                this.stopTool()
                };
        Rg.prototype.doMouseMove = function() {
        var a = this.h;
                if (this.ha && null !== a) {
        var b = this.Ny, c = this.My, d = this.Ly, f = this.ib.IE(a.R.ea, t.K()), g = Vg;
                this.ib instanceof W && (g = this.ib.Ew, g === Wg && (g = this.ib.Oa.wc));
                b = this.computeResize(f, this.dc.alignment, b, c, d, !(g === Xg || g === Yg || a.R.shift));
                this.resize(b);
                a.zg();
                t.B(f)
                }
        };
        Rg.prototype.doMouseUp = function() {
        var a = this.h;
                if (this.ha && null !== a) {
        var b = this.Ny, c = this.My, d = this.Ly, f = this.ib.IE(a.R.ea, t.K()), g = Vg;
                this.ib instanceof W && (g = this.ib.Ew, g === Wg && (g = this.ib.Oa.wc));
                b = this.computeResize(f, this.dc.alignment, b, c, d, !(g === Xg || g === Yg || a.R.shift));
                this.resize(b);
                t.B(f);
                a.Mc();
                this.ff = this.name;
                a.Ba("PartResized", this.ib, this.sv)
                }
        this.stopTool()
                };
        Rg.prototype.resize = function(a) {
        if (null !== this.h) {
        var b = this.pc, c = b.S, d = b.gl(), f = b.dk(), g = Math.PI * d / 180, h = Math.cos(g), g = Math.sin(g), k = 0 < d && 180 > d ? 1 : 0, l = 90 < d && 270 > d ? 1 : 0, d = 180 < d && 360 > d ? 1 : 0, m = a.width - b.Qa.width, n = a.height - b.Qa.height, p = c.position.copy();
                p.x += f * ((a.x + m * l) * h - (a.y + n * k) * g);
                p.y += f * ((a.x + m * d) * g + (a.y + n * l) * h);
                b.Ca = a.size;
                c.rf();
                c.move(p)
                }
        };
        Rg.prototype.computeResize = function(a, b, c, d, f, g) {
        b.Ge() && (b = Kb);
                var h = this.pc.Qa, k = h.x, l = h.y, m = h.x + h.width, n = h.y + h.height, p = 1;
                if (!g) {
        var p = h.width, q = h.height;
                0 >= p && (p = 1);
                0 >= q && (q = 1);
                p = q / p
                }
        q = t.K();
                H.ct(a.x, a.y, k, l, f.width, f.height, q);
                a = h.copy();
                0 >= b.x ? 0 >= b.y ? (a.x = Math.max(q.x, m - d.width), a.x = Math.min(a.x, m - c.width), a.width = Math.max(m - a.x, c.width), a.y = Math.max(q.y, n - d.height), a.y = Math.min(a.y, n - c.height), a.height = Math.max(n - a.y, c.height), g || (b = a.height / a.width, p < b ? (a.height = p * a.width, a.y = n - a.height) :
                        (a.width = a.height / p, a.x = m - a.width))) : 1 <= b.y ? (a.x = Math.max(q.x, m - d.width), a.x = Math.min(a.x, m - c.width), a.width = Math.max(m - a.x, c.width), a.height = Math.max(Math.min(q.y - l, d.height), c.height), g || (b = a.height / a.width, p < b ? a.height = p * a.width : (a.width = a.height / p, a.x = m - a.width))) : (a.x = Math.max(q.x, m - d.width), a.x = Math.min(a.x, m - c.width), a.width = m - a.x, g || (a.height = p * a.width, a.y = l + 0.5 * (n - l - a.height))) : 1 <= b.x ? 0 >= b.y ? (a.width = Math.max(Math.min(q.x - k, d.width), c.width), a.y = Math.max(q.y, n - d.height), a.y = Math.min(a.y,
                n - c.height), a.height = Math.max(n - a.y, c.height), g || (b = a.height / a.width, p < b ? (a.height = p * a.width, a.y = n - a.height) : a.width = a.height / p)) : 1 <= b.y ? (a.width = Math.max(Math.min(q.x - k, d.width), c.width), a.height = Math.max(Math.min(q.y - l, d.height), c.height), g || (b = a.height / a.width, p < b ? a.height = p * a.width : a.width = a.height / p)) : (a.width = Math.max(Math.min(q.x - k, d.width), c.width), g || (a.height = p * a.width, a.y = l + 0.5 * (n - l - a.height))) : 0 >= b.y ? (a.y = Math.max(q.y, n - d.height), a.y = Math.min(a.y, n - c.height), a.height = n - a.y, g || (a.width =
                a.height / p, a.x = k + 0.5 * (m - k - a.width))) : 1 <= b.y && (a.height = Math.max(Math.min(q.y - l, d.height), c.height), g || (a.width = a.height / p, a.x = k + 0.5 * (m - k - a.width)));
                t.B(q);
                return a
                };
        Rg.prototype.computeMinSize = function() {
        var a = this.pc.Rf.copy(), b = this.Rf;
                !isNaN(b.width) && b.width > a.width && (a.width = b.width);
                !isNaN(b.height) && b.height > a.height && (a.height = b.height);
                return a
                };
        Rg.prototype.computeMaxSize = function() {
        var a = this.pc.He.copy(), b = this.He;
                !isNaN(b.width) && b.width < a.width && (a.width = b.width);
                !isNaN(b.height) && b.height < a.height && (a.height = b.height);
                return a
                };
        Rg.prototype.computeCellSize = function() {
        var a = new ga(NaN, NaN), b = this.pc.S;
                if (b) {
        var c = b.SF;
                !isNaN(c.width) && 0 < c.width && (a.width = c.width);
                !isNaN(c.height) && 0 < c.height && (a.height = c.height)
                }
        c = this.$k;
                isNaN(a.width) && !isNaN(c.width) && 0 < c.width && (a.width = c.width);
                isNaN(a.height) && !isNaN(c.height) && 0 < c.height && (a.height = c.height);
                b = this.h;
                (isNaN(a.width) || isNaN(a.height)) && b && (c = b.wb.Fd, null !== c && c.pp && (c = c.lA, isNaN(a.width) && !isNaN(c.width) && 0 < c.width && (a.width = c.width), isNaN(a.height) && !isNaN(c.height) &&
                0 < c.height && (a.height = c.height)), b = b.kp, null !== b && b.visible && this.pp && (c = b.gt, isNaN(a.width) && !isNaN(c.width) && 0 < c.width && (a.width = c.width), isNaN(a.height) && !isNaN(c.height) && 0 < c.height && (a.height = c.height)));
                if (isNaN(a.width) || 0 === a.width || Infinity === a.width)
                a.width = 1;
                if (isNaN(a.height) || 0 === a.height || Infinity === a.height)
                a.height = 1;
                return a
                };
        t.g(Rg, "minSize", Rg.prototype.Rf);
        t.defineProperty(Rg, {Rf: "minSize"}, function() {
        return this.Fj
                }, function(a) {
        t.l(a, ga, Rg, "minSize");
                if (!this.Fj.M(a)) {
        var b = a.width;
                isNaN(b) && (b = 0);
                a = a.height;
                isNaN(a) && (a = 0);
                this.Fj.p(b, a)
                }
        });
        t.g(Rg, "maxSize", Rg.prototype.He);
        t.defineProperty(Rg, {He: "maxSize"}, function() {
        return this.Ej
                }, function(a) {
        t.l(a, ga, Rg, "maxSize");
                if (!this.Ej.M(a)) {
        var b = a.width;
                isNaN(b) && (b = Infinity);
                a = a.height;
                isNaN(a) && (a = Infinity);
                this.Ej.p(b, a)
                }
        });
        t.g(Rg, "cellSize", Rg.prototype.$k);
        t.defineProperty(Rg, {$k: "cellSize"}, function() {
        return this.pj
                }, function(a) {
        t.l(a, ga, Rg, "cellSize");
                this.pj.M(a) || this.pj.assign(a)
                });
        t.g(Rg, "isGridSnapEnabled", Rg.prototype.pp);
        t.defineProperty(Rg, {pp: "isGridSnapEnabled"}, function() {
        return this.Vq
                }, function(a) {
        t.i(a, "boolean", Rg, "isGridSnapEnabled");
                this.Vq = a
                });
        t.g(Rg, "originalDesiredSize", Rg.prototype.tJ);
        t.A(Rg, {tJ: "originalDesiredSize"}, function() {
        return this.sv
                });
        t.g(Rg, "originalLocation", Rg.prototype.uJ);
        t.A(Rg, {uJ: "originalLocation"}, function() {
        return this.jz
                });
        function Zg() {
        0 < arguments.length && t.$c(Zg);
                be.call(this);
                this.name = "Rotating";
                this.eD = 45;
                this.dD = 2;
                this.ib = null;
                var a = new W;
                a.zb = "Ellipse";
                a.Ca = H.Kx;
                a.fill = "lightblue";
                a.stroke = "dodgerblue";
                a.fb = 1;
                a.cursor = "pointer";
                this.Ek = a;
                this.dc = null;
                this.rv = 0;
                this.$C = new w
        }
t.ga("RotatingTool", Zg);
        t.Ka(Zg, be);
        Zg.prototype.updateAdornments = function(a) {
        if (!(null === a || a instanceof V)) {
        if (a.eb && !this.h.ab) {
        var b = a.YF;
                if (null !== b && a.canRotate() && a.pa.N() && a.Sa() && b.pa.N() && b.ol()) {
        var c = a.ap(this.name);
                null === c && (c = this.makeAdornment(b));
                if (null !== c) {
        c.angle = b.gl();
                var d = null, f = null;
                b === a || b === a.kc ? (d = a.kc, f = a.bf) : (d = b, f = Kb);
                for (var g = d.Qa, f = t.lc(g.width * f.x + f.offsetX, g.height * f.y + f.offsetY); null !== d && d !== b; )
                d.transform.Ta(f), d = d.ia;
                var d = f.y, g = Math.max(f.x - b.Qa.width, 0), h = t.K();
                c.location = b.qb(new I(1, 0, 50 +
                        g, d), h);
                t.B(h);
                t.B(f);
                a.Vk(this.name, c);
                return
                }
        }
        }
        a.ul(this.name)
                }
        };
        Zg.prototype.makeAdornment = function(a) {
        var b = null, b = a.S.XF;
                if (null === b) {
        b = new Ke;
                b.type = $g;
                b.bf = Kb;
                var c = this.ht;
                null !== c && b.add(c.copy())
                } else if (Me(b), b = b.copy(), !(b instanceof Ke))
                return null;
                b.Wc = this.name;
                b.pc = a;
                return b
                };
        t.defineProperty(Zg, {ht: "handleArchetype"}, function() {
        return this.Ek
                }, function(a) {
        null !== a && t.l(a, Q, Zg, "handleArchetype");
                this.Ek = a
                });
        t.A(Zg, {handle: "handle"}, function() {
        return this.dc
                });
        t.defineProperty(Zg, {pc: "adornedObject"}, function() {
        return this.ib
                }, function(a) {
        null !== a && t.l(a, Q, Zg, "adornedObject");
                this.ib = a
                });
        Zg.prototype.canStart = function() {
        if (!this.isEnabled)
                return!1;
                var a = this.h;
                return null !== a && !a.ab && a.Po && a.R.left ? null !== this.findToolHandleAt(a.Lc.ea, this.name) ? !0 : !1 : !1
                };
        Zg.prototype.doActivate = function() {
        var a = this.h;
                if (null !== a && (this.dc = this.findToolHandleAt(a.Lc.ea, this.name), null !== this.dc)) {
        this.ib = this.dc.S.pc;
                var b = this.ib.S, c = b.kc;
                this.$C = this.ib === b || this.ib === c ? c.qb(b.bf) : this.ib.qb(Kb);
                this.rv = this.ib.angle;
                a.Hd = !0;
                a.sw = !0;
                this.tc(this.name);
                this.ha = !0
                }
        };
        Zg.prototype.doDeactivate = function() {
        var a = this.h;
                null !== a && (this.gk(), this.ib = this.dc = null, this.ha = a.Hd = !1)
                };
        Zg.prototype.doCancel = function() {
        var a = this.h;
                a && (a.sw = !1);
                this.rotate(this.rv);
                this.stopTool()
                };
        Zg.prototype.doMouseMove = function() {
        var a = this.h;
                this.ha && null !== a && (a = this.computeRotate(a.R.ea), this.rotate(a))
                };
        Zg.prototype.doMouseUp = function() {
        var a = this.h;
                if (this.ha && null !== a) {
        a.sw = !1;
                var b = this.computeRotate(a.R.ea);
                this.rotate(b);
                a.Mc();
                this.ff = this.name;
                a.Ba("PartRotated", this.ib, this.rv)
                }
        this.stopTool()
                };
        Zg.prototype.rotate = function(a) {
        e && t.q(a, Zg, "rotate:newangle");
                null !== this.ib && (this.ib.angle = a)
                };
        Zg.prototype.computeRotate = function(a) {
        a = this.$C.Zi(a);
                var b = this.ib.ia;
                b && (a -= b.gl(), 360 <= a ? a -= 360 : 0 > a && (a += 360));
                var b = Math.min(Math.abs(this.rG), 180), c = Math.min(Math.abs(this.qG), b / 2);
                !this.h.R.shift && 0 < b && 0 < c && (a % b < c ? a = Math.floor(a / b) * b : a % b > b - c && (a = (Math.floor(a / b) + 1) * b));
                360 <= a ? a -= 360 : 0 > a && (a += 360);
                return a
                };
        t.g(Zg, "snapAngleMultiple", Zg.prototype.rG);
        t.defineProperty(Zg, {rG: "snapAngleMultiple"}, function() {
        return this.eD
                }, function(a) {
        t.i(a, "number", Zg, "snapAngleMultiple");
                this.eD = a
                });
        t.g(Zg, "snapAngleEpsilon", Zg.prototype.qG);
        t.defineProperty(Zg, {qG: "snapAngleEpsilon"}, function() {
        return this.dD
                }, function(a) {
        t.i(a, "number", Zg, "snapAngleEpsilon");
                this.dD = a
                });
        t.g(Zg, "originalAngle", Zg.prototype.sJ);
        t.A(Zg, {sJ: "originalAngle"}, function() {
        return this.rv
                });
        function ah() {
        0 < arguments.length && t.$c(ah);
                be.call(this);
                this.name = "ClickSelecting"
        }
t.ga("ClickSelectingTool", ah);
        t.Ka(ah, be);
        ah.prototype.canStart = function() {
        return!this.isEnabled || null === this.h || this.isBeyondDragSize() ? !1 : !0
                };
        ah.prototype.doMouseUp = function() {
        this.ha && (this.standardMouseSelect(), this.standardMouseClick());
                this.stopTool()
                };
        function bh() {
        0 < arguments.length && t.$c(bh);
                be.call(this);
                this.name = "Action";
                this.tn = null
        }
t.ga("ActionTool", bh);
        t.Ka(bh, be);
        bh.prototype.canStart = function() {
        if (!this.isEnabled)
                return!1;
                var a = this.h;
                if (null === a)
                return!1;
                var b = a.R, c = a.ne(b.ea, function(a) {
                for (; null !== a.ia && !a.Lw; )
                        a = a.ia;
                        return a
                        }, function(a) {
                return a.Lw
                        });
                return null !== c ? (this.tn = c, a.Bn = a.ne(b.ea, null, null), !0) : !1
                };
        bh.prototype.doMouseDown = function() {
        if (this.ha) {
        var a = this.h.R, b = this.tn;
                null !== b && (a.ae = b, null !== b.Fz && b.Fz(a, b))
                } else
                this.canStart() && this.doActivate()
                };
        bh.prototype.doMouseMove = function() {
        if (this.ha) {
        var a = this.h.R, b = this.tn;
                null !== b && (a.ae = b, null !== b.Gz && b.Gz(a, b))
                }
        };
        bh.prototype.doMouseUp = function() {
        if (this.ha) {
        var a = this.h, b = a.R, c = this.tn;
                if (null === c)
                return;
                b.ae = c;
                null !== c.Hz && c.Hz(b, c);
                this.isBeyondDragSize() || af(c, b, a)
                }
        this.stopTool()
                };
        bh.prototype.doCancel = function() {
        var a = this.h;
                if (null !== a) {
        var a = a.R, b = this.tn;
                if (null === b)
                return;
                a.ae = b;
                null !== b.Ez && b.Ez(a, b)
                }
        this.stopTool()
                };
        bh.prototype.doStop = function() {
        this.tn = null
                };
        function qa() {
        0 < arguments.length && t.$c(qa);
                be.call(this);
                this.name = "ClickCreating";
                this.wk = null;
                this.qC = !0;
                this.gC = new w(0, 0)
        }
t.ga("ClickCreatingTool", qa);
        t.Ka(qa, be);
        qa.prototype.canStart = function() {
        if (!this.isEnabled || null === this.Os)
                return!1;
                var a = this.h;
                if (null === a || a.ab || a.Ze || !a.ym || !a.R.left || this.isBeyondDragSize())
                return!1;
                if (this.aF) {
        if (1 === a.R.Ae && (this.gC = a.R.Ke.copy()), 2 !== a.R.Ae || this.isBeyondDragSize(this.gC))
                return!1
                } else if (1 !== a.R.Ae)
                return!1;
                return a.Ua !== this && null !== a.dt(a.R.ea, !0) ? !1 : !0
                };
        qa.prototype.doMouseUp = function() {
        var a = this.h;
                this.ha && null !== a && this.insertPart(a.R.ea);
                this.stopTool()
                };
        qa.prototype.insertPart = function(a) {
        var b = this.h;
                if (null === b)
                return null;
                var c = this.Os;
                if (null === c)
                return null;
                this.tc(this.name);
                var d = null;
                c instanceof E ? c.Jd() && (Me(c), d = c.copy(), d instanceof E && b.add(d)) : null !== c && (c = b.ba.copyNodeData(c), t.rb(c) && (b.ba.xm(c), d = b.eh(c)));
                d instanceof E && (d.location = a, b.Pe && b.select(d));
                b.Mc();
                this.ff = this.name;
                b.Ba("PartCreated", d);
                this.gk();
                return d instanceof E ? d : null
                };
        t.g(qa, "archetypeNodeData", qa.prototype.Os);
        t.defineProperty(qa, {Os: "archetypeNodeData"}, function() {
        return this.wk
                }, function(a) {
        null !== a && t.l(a, Object, qa, "archetypeNodeData");
                this.wk = a
                });
        t.g(qa, "isDoubleClick", qa.prototype.aF);
        t.defineProperty(qa, {aF: "isDoubleClick"}, function() {
        return this.qC
                }, function(a) {
        t.i(a, "boolean", qa, "isDoubleClick");
                this.qC = a
                });
        function ch() {
        0 < arguments.length && t.$c(ch);
                be.call(this);
                this.name = "ContextMenu";
                this.Cn = this.QB = null;
                this.GC = new w;
                this.Kn = null;
                if (!0 === t.hB) {
        this.Kn = new Ke;
                this.By = null;
                var a = this;
                this.vD = function() {
                a.stopTool()
                };
                if (!1 === t.lE) {
        var b = document.createElement("div"), c = document.createElement("div");
                b.style.cssText = "top: 0px;z-index:300;position: fixed;display: none;text-align: center;left: 25%;width: 50%;background-color: #F5F5F5;padding: 16px;border: 16px solid #444;border-radius: 10px;margin-top: 10px";
                c.style.cssText = "z-index:299;position: fixed;display: none;top: 0;left: 0;width: 100%;height: 100%;background-color: black;-moz-opacity: 0.8;opacity:.80;filter: alpha(opacity=80);";
                var d = document.createElement("style");
                document.getElementsByTagName("head")[0].appendChild(d);
                d.sheet.insertRule(".defaultCXul { list-style: none; }", 0);
                d.sheet.insertRule(".defaultCXli {font:700 1.5em Helvetica, Arial, sans-serif;position: relative;min-width: 60px; }", 0);
                d.sheet.insertRule(".defaultCXa {color: #444;display: inline-block;padding: 4px;text-decoration: none;margin: 2px;border: 1px solid gray;border-radius: 10px; }",
                        0);
                b.addEventListener("contextmenu", function(a) {
                a.preventDefault();
                        return!1
                }, !1);
                b.addEventListener("selectstart", function(a) {
                a.preventDefault();
                        return!1
                }, !1);
                c.addEventListener("contextmenu", function(a) {
                a.preventDefault();
                        return!1
                }, !1);
                document.body && (document.body.appendChild(b), document.body.appendChild(c));
                t.Us = b;
                t.Ts = c;
                t.lE = !0
        }
        }
        }
t.ga("ContextMenuTool", ch);
        t.Ka(ch, be);
        ch.prototype.canStart = function() {
        if (!this.isEnabled)
                return!1;
                var a = this.h;
                return null === a || this.isBeyondDragSize() || !a.R.right ? !1 : (null === this.Kn || a.R.event instanceof MouseEvent) && null === this.findObjectWithContextMenu() ? !1 : !0
                };
        ch.prototype.doStart = function() {
        var a = this.h;
                null !== a && this.GC.set(a.Lc.ea)
                };
        ch.prototype.doStop = function() {
        this.hideDefaultContextMenu();
                this.hideContextMenu();
                this.Cn = null
                };
        ch.prototype.findObjectWithContextMenu = function(a) {
        var b = this.h;
                if (null === b)
                return null;
                var c = b.R, d = null, d = void 0 !== a ? a : b.ne(c.ea, null, function(a) {
                return!a.layer.yc
                        });
                if (null !== d) {
        for (a = d; null !== a; ) {
        c = a.contextMenu;
                if (null !== c)
                return a;
                a = a.ia
                }
        if (null !== this.Kn && !(b.R.event instanceof MouseEvent))
                return d.S
                } else if (c = b.contextMenu, null !== c)
                return b;
                return null
                };
        ch.prototype.doActivate = function() {
        };
        ch.prototype.doMouseDown = function() {
        if (this.ha) {
        var a = this.h;
                if (null !== a && null !== this.qf) {
        var b = a.ne(a.R.ea, null, null);
                null !== b && b.dj(this.qf) ? (this.standardMouseClick(null, null), this.stopTool()) : (this.stopTool(), a.Ua.doMouseDown())
                }
        }
        };
        ch.prototype.doMouseUp = function() {
        this.ha || this.canStart() && $e(this, !0)
                };
        function $e(a, b, c) {
        a.ha = !0;
                b && a.standardMouseSelect();
                a.standardMouseClick();
                a.Cn = null;
                void 0 === c && (c = a.findObjectWithContextMenu());
                null !== c ? (b = c.contextMenu, null !== b ? (a.Cn = c instanceof Q ? c : null, a.showContextMenu(b, a.Cn)) : a.showDefaultContextMenu()) : a.showDefaultContextMenu()
        }
ch.prototype.doMouseMove = function() {
this.ha && this.standardMouseOver()
        };
        ch.prototype.showContextMenu = function(a, b) {
        t.l(a, Ke, ch, "showContextMenu:contextmenu");
                null !== b && t.l(b, Q, ch, "showContextMenu:obj");
                var c = this.h;
                if (null !== c) {
        a !== this.qf && this.hideContextMenu();
                a.af = "Tool";
                a.vl = !1;
                a.scale = 1 / c.scale;
                a.Wc = this.name;
                c.add(a);
                if (null !== b) {
        var c = null, d = b.dp();
                null !== d && (c = d.data);
                a.pc = b;
                a.data = c
                } else
                a.data = c.ba;
                a.rf();
                this.positionContextMenu(a, b);
                this.qf = a
                }
        };
        ch.prototype.positionContextMenu = function(a) {
        var b = this.h;
                if (null !== b) {
        var c = b.R.ea.copy(), d = a.Ea, f = b.xb;
                b.R.Qw && (c.x -= d.width);
                c.x + d.width > f.right && (c.x -= d.width + 5);
                c.x < f.x && (c.x = f.x);
                c.y + d.height > f.bottom && (c.y -= d.height + 5);
                c.y < f.y && (c.y = f.y);
                a.position = c
                }
        };
        ch.prototype.hideContextMenu = function() {
        var a = this.h;
                null !== a && null !== this.qf && (this.qf.data = null, this.qf.pc = null, a.remove(this.qf), this.qf = null, this.standardMouseOver())
                };
        ch.prototype.initializeDefaultButtons = function() {
        if (null === this.h)
                return null;
                var a = new B, b = this.h.Se;
                a.add({text: "Copy", bh: function() {
                b.copySelection()
                        }, visible: function() {
                return b.canCopySelection()
                }});
                a.add({text: "Cut", bh: function() {
                b.cutSelection()
                        }, visible: function() {
                return b.canCutSelection()
                }});
                a.add({text: "Delete", bh: function() {
                b.deleteSelection()
                        }, visible: function() {
                return b.canDeleteSelection()
                }});
                a.add({text: "Paste", bh: function(a) {
                b.pasteSelection(a.R.ea)
                        }, visible: function() {
                return b.canPasteSelection()
                }});
                a.add({text: "Select All", bh: function() {
                b.selectAll()
                        }, visible: function() {
                return b.canSelectAll()
                }});
                a.add({text: "Undo", bh: function() {
                b.undo()
                        }, visible: function() {
                return b.canUndo()
                }});
                a.add({text: "Redo", bh: function() {
                b.redo()
                        }, visible: function() {
                return b.canRedo()
                }});
                a.add({text: "Zoom To Fit", bh: function() {
                b.zoomToFit()
                        }, visible: function() {
                return b.canZoomToFit()
                }});
                a.add({text: "Reset Zoom", bh: function() {
                b.resetZoom()
                        }, visible: function() {
                return b.canResetZoom()
                }});
                a.add({text: "Group Selection", bh: function() {
                b.groupSelection()
                        },
                        visible: function() {
                        return b.canGroupSelection()
                        }});
                a.add({text: "Ungroup Selection", bh: function() {
                b.ungroupSelection()
                        }, visible: function() {
                return b.canUngroupSelection()
                }});
                a.add({text: "Edit Text", bh: function() {
                b.editTextBlock()
                        }, visible: function() {
                return b.canEditTextBlock()
                }});
                return a
                };
        ch.prototype.showDefaultContextMenu = function() {
        var a = this.h;
                if (null !== a) {
        null === this.By && (this.By = this.initializeDefaultButtons());
                this.Kn !== this.qf && this.hideContextMenu();
                t.Us.innerHTML = "";
                t.Ts.addEventListener("click", this.vD, !1);
                var b = this, c = document.createElement("ul");
                c.className = "defaultCXul";
                t.Us.appendChild(c);
                c.innerHTML = "";
                for (var d = this.By.k; d.next(); ) {
        var f = d.value, g = f.text, h = f.visible;
                if ("function" !== typeof h || h()) {
        h = document.createElement("li");
                h.className = "defaultCXli";
                var k = document.createElement("a");
                k.className = "defaultCXa";
                k.href = "#";
                k.hH = f.bh;
                k.addEventListener("click", function(c) {
                this.hH(a);
                        b.stopTool();
                        c.preventDefault();
                        return!1
                        }, !1);
                k.textContent = g;
                h.appendChild(k);
                c.appendChild(h)
                }
        }
        t.Us.style.display = "block";
                t.Ts.style.display = "block";
                this.qf = this.Kn
                }
        };
        ch.prototype.hideDefaultContextMenu = function() {
        null !== this.qf && this.qf === this.Kn && (t.Us.style.display = "none", t.Ts.style.display = "none", t.Ts.removeEventListener("click", this.vD, !1), this.qf = null)
                };
        t.g(ch, "currentContextMenu", ch.prototype.qf);
        t.defineProperty(ch, {qf: "currentContextMenu"}, function() {
        return this.QB
                }, function(a) {
        null !== a && t.l(a, Ke, ch, "currentContextMenu");
                this.QB = a
                });
        t.g(ch, "currentObject", ch.prototype.iI);
        t.defineProperty(ch, {iI: "currentObject"}, function() {
        return this.Cn
                }, function(a) {
        null !== a && t.l(a, Q, ch, "currentObject");
                this.Cn = a
                });
        t.A(ch, {FK: "mouseDownPoint"}, function() {
        return this.GC
                });
        function dh() {
        0 < arguments.length && t.$c(dh);
                be.call(this);
                this.name = "DragSelecting";
                this.Ln = 175;
                this.vC = !1;
                var a = new E;
                a.af = "Tool";
                a.vl = !1;
                var b = new W;
                b.name = "SHAPE";
                b.zb = "Rectangle";
                b.fill = null;
                b.stroke = "magenta";
                a.add(b);
                this.Il = a
        }
t.ga("DragSelectingTool", dh);
        t.Ka(dh, be);
        dh.prototype.canStart = function() {
        if (!this.isEnabled)
                return!1;
                var a = this.h;
                if (null === a || !a.Pe)
                return!1;
                var b = a.R;
                return!b.left || a.Ua !== this && (!this.isBeyondDragSize() || b.timestamp - a.Lc.timestamp < this.rw || null !== a.dt(b.ea, !0)) ? !1 : !0
                };
        dh.prototype.doActivate = function() {
        var a = this.h;
                null !== a && (this.ha = !0, a.Hd = !0, a.Wa = !0, a.add(this.sg), this.doMouseMove())
                };
        dh.prototype.doDeactivate = function() {
        var a = this.h;
                null !== a && (a.remove(this.sg), a.Wa = !1, this.ha = a.Hd = !1)
                };
        dh.prototype.doMouseMove = function() {
        if (null !== this.h && this.ha && null !== this.sg) {
        var a = this.computeBoxBounds(), b = this.sg.me("SHAPE");
                null === b && (b = this.sg.zw());
                b.Ca = a.size;
                this.sg.position = a.position
                }
        };
        dh.prototype.doMouseUp = function() {
        if (this.ha) {
        var a = this.h;
                a.remove(this.sg);
                try {
                a.$b = "wait", this.selectInRect(this.computeBoxBounds())
                        } finally {
        a.$b = ""
                }
        }
        this.stopTool()
                };
        dh.prototype.computeBoxBounds = function() {
        var a = this.h;
                return null === a ? new x(0, 0, 0, 0) : new x(a.Lc.ea, a.R.ea)
                };
        dh.prototype.selectInRect = function(a) {
        var b = this.h;
                if (null !== b) {
        var c = b.R;
                b.Ba("ChangingSelection");
                a = b.ak(a, null, function(a) {
                return a instanceof E && a.canSelect()
                        }, this.fF);
                if (t.Um ? c.Ap : c.control)
                if (c.shift)
                for (a = a.k; a.next(); )
                c = a.value, c.eb && (c.eb = !1);
                else
                for (a = a.k; a.next(); )
                c = a.value, c.eb = !c.eb;
                else {
                if (!c.shift) {
                for (var d = new B(E), f = b.selection.k; f.next(); )
                        c = f.value, a.contains(c) || d.add(c);
                        for (d = d.k; d.next(); )
                        c = d.value, c.eb = !1
                        }
                for (a = a.k; a.next(); )
                        c = a.value, c.eb || (c.eb = !0)
                        }
        b.Ba("ChangedSelection")
                }
        };
        t.g(dh, "delay", dh.prototype.rw);
        t.defineProperty(dh, {rw: "delay"}, function() {
        return this.Ln
                }, function(a) {
        t.i(a, "number", dh, "delay");
                this.Ln = a
                });
        t.g(dh, "isPartialInclusion", dh.prototype.fF);
        t.defineProperty(dh, {fF: "isPartialInclusion"}, function() {
        return this.vC
                }, function(a) {
        t.i(a, "boolean", dh, "isPartialInclusion");
                this.vC = a
                });
        t.g(dh, "box", dh.prototype.sg);
        t.defineProperty(dh, {sg: "box"}, function() {
        return this.Il
                }, function(a) {
        null !== a && t.l(a, E, dh, "box");
                this.Il = a
                });
        function eh() {
        0 < arguments.length && t.$c(eh);
                be.call(this);
                this.name = "Panning";
                this.lz = new w;
                this.oj = !1;
                var a = this;
                this.jD = function() {
                document.removeEventListener("scroll", a.jD, !1);
                        a.stopTool()
                }
        }
t.ga("PanningTool", eh);
        t.Ka(eh, be);
        eh.prototype.canStart = function() {
        if (!this.isEnabled)
                return!1;
                var a = this.h;
                return null === a || !a.nf && !a.of || !a.R.left || a.Ua !== this && !this.isBeyondDragSize() ? !1 : !0
                };
        eh.prototype.doActivate = function() {
        var a = this.h;
                null !== a && (this.oj ? (a.R.bubbles = !0, document.addEventListener("scroll", this.jD, !1)) : (a.$b = "move", a.Hd = !0, this.lz = a.position.copy()), this.ha = !0)
                };
        eh.prototype.doDeactivate = function() {
        var a = this.h;
                null !== a && (a.$b = "", this.ha = a.Hd = !1)
                };
        eh.prototype.doCancel = function() {
        var a = this.h;
                null !== a && (a.position = this.lz, a.Hd = !1);
                this.stopTool()
                };
        eh.prototype.doMouseMove = function() {
        this.move()
                };
        eh.prototype.doMouseUp = function() {
        this.move();
                this.stopTool()
                };
        eh.prototype.move = function() {
        var a = this.h;
                if (this.ha && a)
                if (this.oj)
                a.R.bubbles = !0;
                else {
                var b = a.position, c = a.Lc.ea, d = a.R.ea, f = b.x + c.x - d.x, c = b.y + c.y - d.y;
                        a.nf || (f = b.x);
                        a.of || (c = b.y);
                        a.position = new w(f, c)
                        }
        };
        t.g(eh, "bubbles", eh.prototype.bubbles);
        t.defineProperty(eh, {bubbles: "bubbles"}, function() {
        return this.oj
                }, function(a) {
        t.i(a, "boolean", eh, "bubbles");
                this.oj = a
                });
        t.g(eh, "originalPosition", eh.prototype.xJ);
        t.A(eh, {xJ: "originalPosition"}, function() {
        return this.lz
                });
        function fh() {
        0 < arguments.length && t.$c(fh);
                be.call(this);
                this.name = "TextEditing";
                this.TB = this.zz = this.nD = null;
                this.iD = gh;
                this.Sk = null;
                this.Ya = hh;
                this.Ok = null;
                var a = document.createElement("textarea");
                a.DB = !0;
                this.YB = a;
                a.addEventListener("input", function() {
                var a = this.textEditingTool.nD;
                        a.text = this.value;
                        ih(a, Infinity, Infinity);
                        this.style.width = 20 + a.Ea.width * this.YJ + "px";
                        this.rows = a.mF
                }, !1);
                a.addEventListener("keydown", function(a) {
                var c = a.which, d = this.textEditingTool;
                        if (null !== d)
                        if (13 === c)
                        d.acceptText(jh);
                        else {
                        if (9 === c)
                                return d.acceptText(kh), a.preventDefault(), !1;
                                27 === c && (d.doCancel(), d.h && d.h.focus())
                        }
                }, !1);
                a.addEventListener("focus", function() {
                var a = this.textEditingTool;
                        a.Ya === lh ? a.Ya = mh : a.Ya === vh ? a.Ya = wh : a.Ya === wh && (a.Ya = mh);
                        this.select()
                }, !1);
                a.addEventListener("blur", function() {
                this.focus();
                        this.select()
                }, !1)
        }
t.ga("TextEditingTool", fh);
        t.Ka(fh, be);
        var xh;
        fh.LostFocus = xh = t.w(fh, "LostFocus", 0);
        var yh;
        fh.MouseDown = yh = t.w(fh, "MouseDown", 1);
        var kh;
        fh.Tab = kh = t.w(fh, "Tab", 2);
        var jh;
        fh.Enter = jh = t.w(fh, "Enter", 3);
        fh.SingleClick = t.w(fh, "SingleClick", 0);
        var gh;
        fh.SingleClickSelected = gh = t.w(fh, "SingleClickSelected", 1);
        var hh = t.w(fh, "StateNone", 0), lh = t.w(fh, "StateActive", 1), mh = t.w(fh, "StateEditing", 2), wh = t.w(fh, "StateEditing2", 3), zh = t.w(fh, "StateValidating", 4), vh = t.w(fh, "StateValidated", 5);
        t.g(fh, "textBlock", fh.prototype.Lg);
        t.defineProperty(fh, {Lg: "textBlock"}, function() {
        return this.zz
                }, function(a) {
        null !== a && t.l(a, na, fh, "textBlock");
                this.zz = a
                });
        t.g(fh, "currentTextEditor", fh.prototype.dh);
        t.defineProperty(fh, {dh: "currentTextEditor"}, function() {
        return this.TB
                }, function(a) {
        this.TB = a
                });
        t.g(fh, "defaultTextEditor", fh.prototype.nE);
        t.defineProperty(fh, {nE: "defaultTextEditor"}, function() {
        return this.YB
                }, function(a) {
        this.YB = a
                });
        t.g(fh, "starting", fh.prototype.sG);
        t.defineProperty(fh, {sG: "starting"}, function() {
        return this.iD
                }, function(a) {
        t.Aa(a, fh, fh, "starting");
                this.iD = a
                });
        fh.prototype.canStart = function() {
        if (!this.isEnabled)
                return!1;
                var a = this.h;
                if (null === a || a.ab || !a.R.left || this.isBeyondDragSize())
                return!1;
                a = a.ne(a.R.ea, null, function(a) {
                return a instanceof na
                        });
                if (!(a instanceof na && a.uw && a.S.canEdit()))
                return!1;
                a = a.S;
                return null === a || this.sG === gh && !a.eb ? !1 : !0
                };
        fh.prototype.doStart = function() {
        this.ha || null === this.Lg || this.doActivate()
                };
        fh.prototype.doActivate = function() {
        if (!this.ha) {
        var a = this.h;
                if (null !== a) {
        var b = this.Lg;
                null === b && (b = a.ne(a.R.ea, function(a) {
                return a instanceof na ? a : null
                        }), b = b instanceof na ? b : null);
                if (null !== b && (this.Lg = b, null !== b.S)) {
        this.ha = !0;
                this.Ya = lh;
                var c = this.nE, d = !1;
                null !== b.iB && (c = b.iB);
                null === c || c.DB || (d = !0);
                this.nD = this.Lg.copy();
                if (c.DB) {
        var f = b.qb(Kb), g = a.position, h = a.scale, k = b.dk() * h, l = b.Qa.width * k;
                Ah(b);
                var m = (f.x - g.x) * h, f = (f.y - g.y) * h;
                c.value = b.text;
                a.$i.style.font = b.font;
                c.style.font = "inherit";
                c.style.fontSize = 100 * k + "%";
                c.style.lineHeight = "normal";
                l = 20 + l;
                c.style.width = l + "px";
                c.style.height = "";
                c.rows = b.mF;
                a.$i.appendChild(c);
                c.style.left = (m - l / 2 | 0) + "px";
                c.style.top = (f - c.clientHeight / 2 | 0) + "px";
                c.style.textAlign = b.textAlign
                } else
                a.$i.appendChild(c);
                c.style.position = "absolute";
                c.style.zIndex = 100;
                c.className = "start";
                c.textEditingTool = this;
                c.YJ = k;
                if (d && void 0 !== c.onActivate)
                c.onActivate();
                this.dh = c;
                c.focus();
                c.select()
                }
        }
        }
        };
        fh.prototype.doCancel = function() {
        null !== this.Ok && (this.dh.style.border = this.Ok, this.Ok = null);
                this.stopTool()
                };
        fh.prototype.doMouseUp = function() {
        !this.ha && this.canStart() && this.doActivate()
                };
        fh.prototype.doMouseDown = function() {
        this.ha && this.acceptText(yh)
                };
        fh.prototype.acceptText = function(a) {
        switch (a) {
        case yh:
                if (this.Ya === vh || this.Ya === wh)
                this.dh.focus();
                else if (this.Ya === lh || this.Ya === mh)
                this.Ya = zh, Bh(this);
                break;
                case xh:
                case jh:
                case kh:
                if (jh === a && !0 === this.zz.Pw)
                break;
                if (this.Ya === lh || this.Ya === mh)
                this.Ya = zh, Bh(this)
                }
        };
        function Bh(a) {
        if (null !== a.Lg && null !== a.dh) {
        var b = a.Lg, c = a.Lg.text, d = a.dh.value, f = "", f = "function" === typeof d ? d() : d;
                if (!a.isValidText(a.Lg, c, f)) {
        a.Ya = mh;
                null !== b.$s && b.$s(a, c, f);
                null === a.Ok && (a.Ok = a.dh.style.border, a.dh.style.border = "3px solid red");
                a.dh.focus();
                return
        }
        a.tc(a.name);
                a.Ya = vh;
                c !== f && (a.Lg.text = f);
                a.ff = a.name;
                b = a.h;
                null !== b && b.Ba("TextEdited", a.Lg, c);
                a.gk();
                a.stopTool();
                null !== b && b.focus()
        }
        null !== a.Ok && (a.dh.style.border = a.Ok, a.Ok = null)
        }
fh.prototype.doDeactivate = function() {
var a = this.h;
        if (null !== a) {
this.Ya = hh;
        this.Lg = null;
        if (null !== this.dh) {
var b = this.dh;
        if (void 0 !== b.onDeactivate)
        b.onDeactivate();
        null !== b && a.$i.removeChild(b)
        }
this.ha = !1
        }
};
        fh.prototype.isValidText = function(a, b, c) {
        t.l(a, na, fh, "isValidText:textblock");
                var d = this.Ut;
                if (null !== d && !d(a, b, c))
                return!1;
                d = a.Ut;
                return null === d || d(a, b, c) ? !0 : !1
                };
        t.g(fh, "textValidation", fh.prototype.Ut);
        t.defineProperty(fh, {Ut: "textValidation"}, function() {
        return this.Sk
                }, function(a) {
        null !== a && t.i(a, "function", fh, "textValidation");
                this.Sk = a
                });
        function Ie() {
        be.call(this);
                this.name = "ToolManager";
                this.HC = new B(be);
                this.IC = new B(be);
                this.JC = new B(be);
                this.jC = this.kC = 1E3;
                this.$B = (new ga(2, 2)).Ja();
                this.xu = this.zy = null;
                this.KC = cf
        }
t.ga("ToolManager", Ie);
        t.Ka(Ie, be);
        var cf;
        Ie.WheelScroll = cf = t.w(Ie, "WheelScroll", 0);
        var bf;
        Ie.WheelZoom = bf = t.w(Ie, "WheelZoom", 1);
        Ie.WheelNone = t.w(Ie, "WheelNone", 2);
        t.g(Ie, "mouseWheelBehavior", Ie.prototype.bn);
        t.defineProperty(Ie, {bn: "mouseWheelBehavior"}, function() {
        return this.KC
                }, function(a) {
        t.Aa(a, Ie, Ie, "mouseWheelBehavior");
                this.KC = a
                });
        Ie.prototype.initializeStandardTools = function() {
        this.ED = new bh;
                this.TA = new jf;
                this.pF = new Ig;
                this.VF = new Rg;
                this.$F = new Zg;
                this.AA = new pa;
                this.Fd = new df;
                this.tE = new dh;
                this.IF = new eh;
                this.lw = new ch;
                this.yx = new fh;
                this.VD = new qa;
                this.WD = new ah
                };
        Ie.prototype.doMouseDown = function() {
        var a = this.h;
                if (null !== a) {
        var b = a.ja;
                b.Tz && 0 !== b.Je && t.trace("WARNING: In ToolManager.doMouseDown: UndoManager.transactionLevel is not zero");
                for (var b = this.df.length, c = 0; c < b; c++) {
        var d = this.df.wa(c);
                null === d.h && d.wd(this.h);
                if (d.canStart()) {
        a.Ua = d;
                a.Ua === d && (d.ha || d.doActivate(), d.doMouseDown());
                return
                }
        }
        1 === a.R.button && (this.bn === cf ? this.bn = bf : this.bn === bf && (this.bn = cf));
                this.doActivate();
                this.standardWaitAfter(this.mA)
                }
        };
        Ie.prototype.doMouseMove = function() {
        var a = this.h;
                if (null !== a) {
        if (this.ha)
                for (var b = this.Bg.length, c = 0; c < b; c++) {
        var d = this.Bg.wa(c);
                null === d.h && d.wd(this.h);
                if (d.canStart()) {
        a.Ua = d;
                a.Ua === d && (d.ha || d.doActivate(), d.doMouseMove());
                return
                }
        }
        this.standardMouseOver();
                this.isBeyondDragSize() && this.standardWaitAfter(this.ha ? this.mA : this.SE)
                }
        };
        Ie.prototype.doCurrentObjectChanged = function(a, b) {
        var c = this.dl;
                null === c || null !== b && (b === c || b.dj(c)) || this.hideToolTip()
                };
        Ie.prototype.doWaitAfter = function() {
        this.h && this.h.jb && (this.doMouseHover(), this.ha || this.doToolTip())
                };
        Ie.prototype.doMouseHover = function() {
        var a = this.h;
                if (null !== a) {
        var b = a.R;
                null === b.ae && (b.ae = a.ne(b.ea, null, null));
                var c = b.ae;
                if (null !== c)
                for (; null !== c; ) {
        a = this.ha ? c.wt : c.xt;
                if (null !== a && (a(b, c), b.Ee))
                break;
                c = c.ia
                }
        else
                a = this.ha ? a.wt : a.xt, null !== a && a(b)
                }
        };
        Ie.prototype.doToolTip = function() {
        var a = this.h;
                if (null !== a) {
        var b = a.R;
                null === b.ae && (b.ae = a.ne(b.ea, null, null));
                b = b.ae;
                if (null !== b) {
        if (b !== this.dl && !b.dj(this.dl)) {
        for (; null !== b; ) {
        a = b.Vt;
                if (null !== a) {
        this.showToolTip(a, b);
                return
                }
        b = b.ia
                }
        this.hideToolTip()
                }
        } else
                a = a.Vt, null !== a ? this.showToolTip(a, null) : this.hideToolTip()
                }
        };
        Ie.prototype.showToolTip = function(a, b) {
        t.l(a, Ke, Ie, "showToolTip:tooltip");
                null !== b && t.l(b, Q, Ie, "showToolTip:obj");
                var c = this.h;
                if (null !== c) {
        a !== this.dl && this.hideToolTip();
                a.af = "Tool";
                a.vl = !1;
                a.scale = 1 / c.scale;
                c.add(a);
                if (null !== b && b !== this.xu) {
        var c = null, d = b.dp();
                null !== d && (c = d.data);
                a.pc = b;
                a.data = c
                } else
                null === b && (a.data = c.ba);
                if (null === b || b !== this.xu)
                a.rf(), this.positionToolTip(a, b);
                this.zy = a;
                this.xu = b
                }
        };
        Ie.prototype.positionToolTip = function(a) {
        var b = this.h;
                if (null !== b) {
        var c = b.R.ea.copy(), d = a.Ea, f = b.xb;
                b.R.Qw && (c.x -= d.width);
                c.x + d.width > f.right && (c.x -= d.width + 5);
                c.x < f.x && (c.x = f.x);
                c.y = c.y + 20 + d.height > f.bottom ? c.y - (d.height + 5) : c.y + 20;
                c.y < f.y && (c.y = f.y);
                a.position = c
                }
        };
        Ie.prototype.hideToolTip = function() {
        if (null !== this.dl) {
        var a = this.h;
                null !== a && (this.dl.data = null, this.dl.pc = null, a.remove(this.dl), this.xu = this.zy = null)
                }
        };
        t.A(Ie, {dl: "currentToolTip"}, function() {
        return this.zy
                });
        Ie.prototype.doMouseUp = function() {
        this.cancelWaitAfter();
                if (this.ha) {
        var a = this.h;
                if (null === a)
                return;
                for (var b = this.Cg.length, c = 0; c < b; c++) {
        var d = this.Cg.wa(c);
                null === d.h && d.wd(this.h);
                if (d.canStart()) {
        a.Ua = d;
                a.Ua === d && (d.ha || d.doActivate(), d.doMouseUp());
                return
                }
        }
        }
        this.doDeactivate()
                };
        Ie.prototype.doMouseWheel = function() {
        this.standardMouseWheel()
                };
        Ie.prototype.doKeyDown = function() {
        var a = this.h;
                null !== a && a.Se.doKeyDown()
                };
        Ie.prototype.doKeyUp = function() {
        var a = this.h;
                null !== a && a.Se.doKeyUp()
                };
        Ie.prototype.doCancel = function() {
        null !== gf && gf.doCancel();
                be.prototype.doCancel.call(this)
                };
        Ie.prototype.findTool = function(a) {
        t.i(a, "string", Ie, "findTool:name");
                for (var b = this.df.length, c = 0; c < b; c++) {
        var d = this.df.wa(c);
                if (d.name === a)
                return d
                }
        b = this.Bg.length;
                for (c = 0; c < b; c++)
                if (d = this.Bg.wa(c), d.name === a)
                return d;
                b = this.Cg.length;
                for (c = 0; c < b; c++)
                if (d = this.Cg.wa(c), d.name === a)
                return d;
                return null
                };
        Ie.prototype.replaceTool = function(a, b) {
        t.i(a, "string", Ie, "replaceTool:name");
                null !== b && (t.l(b, be, Ie, "replaceTool:newtool"), b.h && b.h !== this.h && t.m("Cannot share tools between Diagrams: " + b.toString()), b.wd(this.h));
                for (var c = this.df.length, d = 0; d < c; d++) {
        var f = this.df.wa(d);
                if (f.name === a)
                return null !== b ? this.df.Kg(d, b) : this.df.qd(d), f
                }
        c = this.Bg.length;
                for (d = 0; d < c; d++)
                if (f = this.Bg.wa(d), f.name === a)
                return null !== b ? this.Bg.Kg(d, b) : this.Bg.qd(d), f;
                c = this.Cg.length;
                for (d = 0; d < c; d++)
                if (f = this.Cg.wa(d), f.name ===
                        a)
                return null !== b ? this.Cg.Kg(d, b) : this.Cg.qd(d), f;
                return null
                };
        function Ch(a, b, c, d) {
        t.i(b, "string", Ie, "replaceStandardTool:name");
                t.l(d, B, Ie, "replaceStandardTool:list");
                null !== c && (t.l(c, be, Ie, "replaceStandardTool:newtool"), c.h && c.h !== a.h && t.m("Cannot share tools between Diagrams: " + c.toString()), c.name = b, c.wd(a.h));
                a.findTool(b) ? a.replaceTool(b, c) : null !== c && d.add(c)
        }
t.A(Ie, {df: "mouseDownTools"}, function() {
return this.HC
        });
        t.A(Ie, {Bg: "mouseMoveTools"}, function() {
        return this.IC
                });
        t.A(Ie, {Cg: "mouseUpTools"}, function() {
        return this.JC
                });
        t.g(Ie, "hoverDelay", Ie.prototype.SE);
        t.defineProperty(Ie, {SE: "hoverDelay"}, function() {
        return this.kC
                }, function(a) {
        t.i(a, "number", Ie, "hoverDelay");
                this.kC = a
                });
        t.g(Ie, "holdDelay", Ie.prototype.mA);
        t.defineProperty(Ie, {mA: "holdDelay"}, function() {
        return this.jC
                }, function(a) {
        t.i(a, "number", Ie, "holdDelay");
                this.jC = a
                });
        t.g(Ie, "dragSize", Ie.prototype.uE);
        t.defineProperty(Ie, {uE: "dragSize"}, function() {
        return this.$B
                }, function(a) {
        t.l(a, ga, Ie, "dragSize");
                this.$B = a.Z()
                });
        t.g(Ie, "actionTool", Ie.prototype.ED);
        t.defineProperty(Ie, {ED: "actionTool"}, function() {
        return this.findTool("Action")
                }, function(a) {
        Ch(this, "Action", a, this.df)
                });
        t.g(Ie, "relinkingTool", Ie.prototype.TA);
        t.defineProperty(Ie, {TA: "relinkingTool"}, function() {
        return this.findTool("Relinking")
                }, function(a) {
        Ch(this, "Relinking", a, this.df)
                });
        t.g(Ie, "linkReshapingTool", Ie.prototype.pF);
        t.defineProperty(Ie, {pF: "linkReshapingTool"}, function() {
        return this.findTool("LinkReshaping")
                }, function(a) {
        Ch(this, "LinkReshaping", a, this.df)
                });
        t.g(Ie, "resizingTool", Ie.prototype.VF);
        t.defineProperty(Ie, {VF: "resizingTool"}, function() {
        return this.findTool("Resizing")
                }, function(a) {
        Ch(this, "Resizing", a, this.df)
                });
        t.g(Ie, "rotatingTool", Ie.prototype.$F);
        t.defineProperty(Ie, {$F: "rotatingTool"}, function() {
        return this.findTool("Rotating")
                }, function(a) {
        Ch(this, "Rotating", a, this.df)
                });
        t.g(Ie, "linkingTool", Ie.prototype.AA);
        t.defineProperty(Ie, {AA: "linkingTool"}, function() {
        return this.findTool("Linking")
                }, function(a) {
        Ch(this, "Linking", a, this.Bg)
                });
        t.g(Ie, "draggingTool", Ie.prototype.Fd);
        t.defineProperty(Ie, {Fd: "draggingTool"}, function() {
        return this.findTool("Dragging")
                }, function(a) {
        Ch(this, "Dragging", a, this.Bg)
                });
        t.g(Ie, "dragSelectingTool", Ie.prototype.tE);
        t.defineProperty(Ie, {tE: "dragSelectingTool"}, function() {
        return this.findTool("DragSelecting")
                }, function(a) {
        Ch(this, "DragSelecting", a, this.Bg)
                });
        t.g(Ie, "panningTool", Ie.prototype.IF);
        t.defineProperty(Ie, {IF: "panningTool"}, function() {
        return this.findTool("Panning")
                }, function(a) {
        Ch(this, "Panning", a, this.Bg)
                });
        t.g(Ie, "contextMenuTool", Ie.prototype.lw);
        t.defineProperty(Ie, {lw: "contextMenuTool"}, function() {
        return this.findTool("ContextMenu")
                }, function(a) {
        Ch(this, "ContextMenu", a, this.Cg)
                });
        t.g(Ie, "textEditingTool", Ie.prototype.yx);
        t.defineProperty(Ie, {yx: "textEditingTool"}, function() {
        return this.findTool("TextEditing")
                }, function(a) {
        Ch(this, "TextEditing", a, this.Cg)
                });
        t.g(Ie, "clickCreatingTool", Ie.prototype.VD);
        t.defineProperty(Ie, {VD: "clickCreatingTool"}, function() {
        return this.findTool("ClickCreating")
                }, function(a) {
        Ch(this, "ClickCreating", a, this.Cg)
                });
        t.g(Ie, "clickSelectingTool", Ie.prototype.WD);
        t.defineProperty(Ie, {WD: "clickSelectingTool"}, function() {
        return this.findTool("ClickSelecting")
                }, function(a) {
        Ch(this, "ClickSelecting", a, this.Cg)
                });
        function Ce() {
        this.jH = Dh;
                this.U = null;
                new ja;
                this.Pl = this.Ql = null;
                this.GB = this.sd = this.br = this.wj = !1;
                this.Le = !0;
                this.wu = this.vu = this.RB = null;
                this.xy = 0;
                this.Iy = 600;
                this.pH = new w(0, 0);
                this.IB = this.HB = this.zD = !1;
                this.to = new ja
        }
function Dh(a, b, c, d) {
a /= d / 2;
        return 1 > a ? c / 2 * a * a + b : - c / 2 * (--a * (a - 2) - 1) + b
        }
Ce.prototype.prepareAnimation = Ce.prototype.tl = function() {
this.Le && (this.wj && this.mn(), this.sd = !0, this.GB = !1)
        };
        function Eh(a) {
        a.Le && requestAnimationFrame(function() {
        !1 === a.sd || a.wj || (a.sd = !1, a.U.Ba("AnimationStarting"), Fh(a))
        })
        }
function Gh(a, b, c, d) {
if (a.sd && (e && (b instanceof Q || t.m("addToAnimation:object must be a GraphObject.")), !(b instanceof E) || b.oA)) {
var f = a.to, g;
        f.contains(b) ? (b = f.za(b), a = b[0], g = b[1], void 0 === a.position && (a.position = Hh(c)), g.position = Hh(d)) : (a = {}, g = {}, a.position = Hh(c), g.position = Hh(d), f.add(b, [a, g]))
        }
}
function Hh(a) {
return a instanceof w ? a.copy() : a instanceof ga ? a.copy() : a
        }
function Fh(a) {
var b, c = a.U;
        if (null !== c)
        if (0 === a.to.count)
        a.wj = !1, c.zg();
        else {
        a.wj = !0;
                b || (b = {});
                var d = b.vK || a.jH, f = b.HK || null, g = b.IK || null, h = b.duration || a.Iy;
                b = a.to.k;
                for (var k = a.pH; b.next(); ) {
        var l = b.value[0].position;
                l && !l.N() && l.assign(k)
                }
        a.RB = d;
                a.vu = f;
                a.wu = g;
                a.xy = h;
                var m = a.iH = a.to;
                Ih(a);
                Jh(a, c, m, d, 0, h, null !== a.Ql && null !== a.Pl);
                Kh(a.U);
                Lh(a);
                requestAnimationFrame(function(b) {
                var f = b || + new Date, g = f + h, k;
                        (function u(b) {
                        !1 !== a.wj && (k = b || + new Date, b = k > g ? h : k - f, Ih(a), Jh(a, c, m, d, b, h, null !== a.Ql && null !==
                                a.Pl), a.vu && a.vu(), Kh(c), Lh(a), k > g ? Mh(a) : requestAnimationFrame(u))
                        })(f)
                        })
                }
}
var Nh = {opacity: function(a, b, c, d, f, g) {
a.opacity = d(f, b, c - b, g)
        }, position: function(a, b, c, d, f, g) {
f !== g ? a.lG(d(f, b.x, c.x - b.x, g), d(f, b.y, c.y - b.y, g)) : a.position = new w(d(f, b.x, c.x - b.x, g), d(f, b.y, c.y - b.y, g))
        }, scale: function(a, b, c, d, f, g) {
a.scale = d(f, b, c - b, g)
        }, visible: function(a, b, c, d, f, g) {
a.visible = f !== g ? b : c
}};
        function Ih(a) {
        if (!a.br) {
        var b = a.U;
                a.zD = b.Wa;
                a.HB = b.Qt;
                a.IB = b.zo;
                b.Wa = !0;
                b.Qt = !0;
                b.zo = !0;
                a.br = !0
        }
        }
function Lh(a) {
var b = a.U;
        b.Wa = a.zD;
        b.Qt = a.HB;
        b.zo = a.IB;
        a.br = !1
        }
function Jh(a, b, c, d, f, g, h) {
for (c = c.k; c.next(); ) {
var k = c.key, l = c.value, m = l[0], l = l[1], n;
        for (n in l)
        if (void 0 !== Nh[n])
        Nh[n](k, m[n], l[n], d, f, g)
        }
h && (h = a.Ql, a = a.Pl, n = a.y - h.y, a = d(f, h.x, a.x - h.x, g), d = d(f, h.y, n, g), f = b.Wb, b.Wb = !0, b.position = new w(a, d), b.Wb = f)
        }
Ce.prototype.stopAnimation = Ce.prototype.mn = function() {
!0 === this.sd && (this.sd = !1, this.GB && this.U.Zd());
        this.wj && this.Le && (Ih(this), Jh(this, this.U, this.iH, this.RB, this.xy, this.xy, null !== this.Ql && null !== this.Pl), Lh(this), Mh(this))
        };
        function Mh(a) {
        a.wj = !1;
                a.Ql = null;
                a.Pl = null;
                a.to = new ja;
                Ih(a);
                for (var b = a.U.links; b.next(); ) {
        var c = b.value;
                null !== c.yo && (c.points = c.yo, c.yo = null)
        }
        b = a.U;
                b.Mc();
                b.zg();
                Lh(a);
                a.wu && a.wu();
                a.wu = null;
                a.vu = null;
                b.Ba("AnimationFinished")
        }
function Oh(a, b, c) {
var d = b.pa, f = c.pa;
        c instanceof T && c.placeholder ? (c = c.placeholder, d = c.qb(Eb), d.x += c.padding.left, d.y += c.padding.top, Gh(a, b, d, b.position)) : Gh(a, b, new w(f.x + f.width / 2 - d.width / 2, f.y + f.height / 2 - d.height / 2), b.position)
        }
function Ph(a, b, c) {
a.sd && (null === a.Ql && b.N() && null === a.Pl && (a.Ql = b.copy()), a.Pl = c.copy())
        }
t.g(Ce, "isEnabled", Ce.prototype.isEnabled);
        t.defineProperty(Ce, {isEnabled: "isEnabled"}, function() {
        return this.Le
                }, function(a) {
        t.i(a, "boolean", Ce, "isEnabled");
                this.Le = a
                });
        t.g(Ce, "duration", Ce.prototype.duration);
        t.defineProperty(Ce, {duration: "duration"}, function() {
        return this.Iy
                }, function(a) {
        t.i(a, "number", Ce, "duration");
                1 > a && t.la(a, ">= 1", Ce, "duration");
                this.Iy = a
                });
        t.A(Ce, {vg: "isAnimating"}, function() {
        return this.wj
                });
        t.A(Ce, {yK: "isTicking"}, function() {
        return this.br
                });
        function ae() {
        0 < arguments.length && t.$c(ae);
                t.Ac(this);
                this.U = null;
                this.Fb = new B(E);
                this.Yb = "";
                this.If = 1;
                this.$y = !1;
                this.Qk = this.Dz = this.tk = this.sk = this.rk = this.qk = this.ok = this.pk = this.nk = this.vk = this.mk = this.uk = this.lk = this.kk = !0;
                this.Xy = !1;
                this.tv = []
        }
t.ga("Layer", ae);
        ae.prototype.wd = function(a) {
        this.U = a
                };
        ae.prototype.toString = function(a) {
        void 0 === a && (a = 0);
                var b = 'Layer "' + this.name + '"';
                if (0 >= a)
                return b;
                for (var c = 0, d = 0, f = 0, g = 0, h = 0, k = this.Fb.k; k.next(); ) {
        var l = k.value;
                l instanceof T ? f++ : l instanceof S ? d++ : l instanceof V ? g++ : l instanceof Ke ? h++ : c++
                }
        k = "";
                0 < c && (k += c + " Parts ");
                0 < d && (k += d + " Nodes ");
                0 < f && (k += f + " Groups ");
                0 < g && (k += g + " Links ");
                0 < h && (k += h + " Adornments ");
                if (1 < a)
                for (c = this.Fb.k; c.next(); )
                d = c.value, k += "\n    " + d.toString(a - 1), (f = d.data) && t.od(f) && (k += " #" + t.od(f)), d instanceof S ? k += " " + yd(f) :
                d instanceof V && (k += " " + yd(d.aa) + " " + yd(d.ca));
                return b + " " + this.Fb.count + ": " + k
                };
        ae.prototype.findObjectAt = ae.prototype.ne = function(a, b, c) {
        void 0 === b && (b = null);
                void 0 === c && (c = null);
                if (!1 === this.Qk)
                return null;
                e && !a.N() && t.m("findObjectAt: Point must have a real value.");
                var d = this.Fb, f = !1;
                this.h.xb.Ga(a) && (f = !0);
                for (var g = t.K(), h = d.length; h--; ) {
        var k = d.wa(h);
                if ((!0 !== f || !1 !== Qh(k)) && k.Sa() && (g.assign(a), Qa(g, k.ke), k = k.ne(g, b, c), null !== k && (null !== b && (k = b(k)), k && (null === c || c(k)))))
                return t.B(g), k
                }
        t.B(g);
                return null
                };
        ae.prototype.findObjectsAt = ae.prototype.bp = function(a, b, c, d) {
        void 0 === b && (b = null);
                void 0 === c && (c = null);
                d instanceof B || d instanceof C || (d = new C(Q));
                if (!1 === this.Qk)
                return d;
                e && !a.N() && t.m("findObjectsAt: Point must have a real value.");
                var f = this.Fb, g = !1;
                this.h.xb.Ga(a) && (g = !0);
                for (var h = t.K(), k = f.length; k--; ) {
        var l = f.wa(k);
                !0 === g && !1 === Qh(l) || !l.Sa() || (h.assign(a), Qa(h, l.ke), l.bp(h, b, c, d) && (null !== b && (l = b(l)), l && (null === c || c(l)) && d.add(l)))
                }
        t.B(h);
                return d
                };
        ae.prototype.findObjectsIn = ae.prototype.ak = function(a, b, c, d, f) {
        void 0 === b && (b = null);
                void 0 === c && (c = null);
                void 0 === d && (d = !1);
                f instanceof B || f instanceof C || (f = new C(Q));
                if (!1 === this.Qk)
                return f;
                e && !a.N() && t.m("findObjectsIn: Rect must have a real value.");
                var g = this.Fb, h = !1;
                this.h.xb.Wj(a) && (h = !0);
                for (var k = g.length, g = g.n; k--; ) {
        var l = g[k];
                (!0 !== h || !1 !== Qh(l)) && l.Sa() && l.ak(a, b, c, d, f) && (null !== b && (l = b(l)), l && (null === c || c(l)) && f.add(l))
                }
        return f
                };
        ae.prototype.cA = function(a, b, c, d, f, g, h) {
        if (!1 === this.Qk)
                return f;
                for (var k = this.Fb, l = k.length, k = k.n; l--; ) {
        var m = k[l];
                (!0 !== h || !1 !== Qh(m)) && g(m) && m.Sa() && m.ak(a, b, c, d, f) && (null !== b && (m = b(m)), m && (null === c || c(m)) && f.add(m))
                }
        return f
                };
        ae.prototype.findObjectsNear = ae.prototype.Pm = function(a, b, c, d, f, g) {
        void 0 === c && (c = null);
                void 0 === d && (d = null);
                void 0 === f && (f = !0);
                if (!1 !== f && !0 !== f) {
        if (f instanceof B || f instanceof C)
                g = f;
                f = !0
                }
        g instanceof B || g instanceof C || (g = new C(Q));
                if (!1 === this.Qk)
                return g;
                e && !a.N() && t.m("findObjectsNear: Point must have a real value.");
                var h = this.Fb, k = !1;
                this.h.xb.Ga(a) && (k = !0);
                for (var l = t.K(), m = t.K(), n = h.length; n--; ) {
        var p = h.n[n];
                !0 === k && !1 === Qh(p) || !p.Sa() || (l.assign(a), Qa(l, p.ke), m.p(a.x + b, a.y), Qa(m, p.ke),
                p.Pm(l, m, c, d, f, g) && (null !== c && (p = c(p)), p && (null === d || d(p)) && g.add(p)))
                }
        t.B(l);
                t.B(m);
                return g
                };
        aa = ae.prototype;
        aa.Vf = function(a, b) {
        if (this.visible) {
        var c = this.Fb, d;
                d = b ? b : a.xb;
                for (var f = c.length, g = 0; g < f; g++) {
        var h = c.n[g];
                h.BC = g;
                if (!(h instanceof V && !1 === h.og || h instanceof Ke && null !== h.Wh))
                if (eb(h.pa, d))
                for (h.Vf(!0), Rh(h), h = h.Yv; h.next(); ) {
        var k = h.value;
                ih(k, Infinity, Infinity);
                k.Jc();
                k.Vf(!0)
                }
        else
                h.Vf(!1), null !== h.Yv && 0 < h.Yv.count && Rh(h)
                }
        }
        };
        aa.Ue = function(a, b, c, d) {
        if (this.visible && (void 0 === d && (d = !0), d || !this.yc)) {
        1 !== this.If && (a.globalAlpha = this.If);
                c = this.Fb;
                d = this.tv;
                d.length = 0;
                for (var f = b.scale, g = c.length, h = 0; h < g; h++) {
        var k = c.n[h];
                if (Qh(k)) {
        if (k instanceof V && (k.ic && d.push(k), !1 === k.og))
                continue;
                var l = k.pa;
                1 < l.width * f || 1 < l.height * f ? k.Ue(a, b) : Sh(k, a)
                }
        }
        a.globalAlpha = 1
                }
        };
        function Th(a, b, c, d) {
        if (a.visible) {
        b.globalAlpha = a.If;
                var f = a.Fb;
                a = a.tv;
                a.length = 0;
                for (var g = c.scale, h = f.length, k = d.length, l = 0; l < h; l++) {
        var m = f.n[l];
                if (Qh(m)) {
        if (m instanceof V && (m.ic && a.push(m), !1 === m.og))
                continue;
                var n = Uh(m, m.pa), p;
                a:{
                p = n;
                        for (var q = d, r = k, s = 2 / g, u = 4 / g, v = 0; v < r; v++) {
                var D = q[v];
                        if (0 !== D[2] && 0 !== D[3] && p.ZE(D[0] - s, D[1] - s, D[2] + u, D[3] + u)) {
                p = !0;
                        break a
                }
                }
                p = !1
                }
        p && (1 < n.width * g || 1 < n.height * g ? m.Ue(b, c) : Sh(m, b))
        }
        }
        b.globalAlpha = 1
        }
        }
aa.j = function(a, b, c, d, f) {
var g = this.h;
        null !== g && g.Zc(vd, a, this, b, c, d, f)
        };
        aa.mp = function(a, b, c) {
        var d = this.Fb;
                b.mo = this;
                if (a >= d.count)
                a = d.count;
                else if (d.wa(a) === b)
                return - 1;
                d.Gd(a, b);
                b.kt(c);
                d = this.h;
                null !== d && (c ? d.ka() : d.mp(b));
                b instanceof T && this.ux(b);
                return a
                };
        aa.Xe = function(a, b, c) {
        var d = this.Fb;
                if (0 > a || a >= d.length) {
        if (a = d.indexOf(b), 0 > a)
                return - 1
                } else if (d.wa(a) !== b && (a = d.indexOf(b), 0 > a))
                return - 1;
                b.lt(c);
                d.qd(a);
                d = this.h;
                null !== d && (c ? d.ka() : d.Xe(b));
                b.mo = null;
                return a
                };
        aa.ux = function(a) {
        for (; null !== a; ) {
        if (a.layer === this) {
        var b = a;
                if (b.Xc.next()) {
        for (var c = - 1, d = - 1, f = this.Fb.n, g = f.length, h = 0; h < g; h++) {
        var k = f[h];
                if (k === b && (c = h, 0 <= d))
                break;
                if (0 > d && k.gb === b && (d = h, 0 <= c))
                break
                }
        !(0 > d) && d < c && (f = this.Fb, f.qd(c), f.Gd(d, b))
                }
        }
        a = a.gb
                }
        };
        aa.clear = function() {
        for (var a = this.Fb.Ie(), b = a.length, c = 0; c < b; c++)
                a[c].Vf(!1), this.Xe( - 1, a[c], !1)
                };
        t.A(ae, {rl: "parts"}, function() {
        return this.Fb.k
                });
        t.A(ae, {LK: "partsBackwards"}, function() {
        return this.Fb.Wm
                });
        t.A(ae, {h: "diagram"}, function() {
        return this.U
                });
        t.g(ae, "name", ae.prototype.name);
        t.defineProperty(ae, {name: "name"}, function() {
        return this.Yb
                }, function(a) {
        t.i(a, "string", ae, "name");
                var b = this.Yb;
                if (b !== a) {
        var c = this.h;
                if (null !== c)
                for ("" === b && t.m("Cannot rename default Layer to: " + a), c = c.Uw; c.next(); )
                c.value.name === a && t.m("Layer.name is already present in this diagram: " + a);
                this.Yb = a;
                this.j("name", b, a);
                for (a = this.Fb.k; a.next(); )
                a.value.af = this.Yb
                }
        });
        t.g(ae, "opacity", ae.prototype.opacity);
        t.defineProperty(ae, {opacity: "opacity"}, function() {
        return this.If
                }, function(a) {
        var b = this.If;
                b !== a && (t.i(a, "number", ae, "opacity"), (0 > a || 1 < a) && t.la(a, "0 <= val <= 1", ae, "opacity"), this.If = a, this.j("opacity", b, a), a = this.h, null !== a && a.ka())
                });
        t.g(ae, "isTemporary", ae.prototype.yc);
        t.defineProperty(ae, {yc: "isTemporary"}, function() {
        return this.$y
                }, function(a) {
        var b = this.$y;
                b !== a && (t.i(a, "boolean", ae, "isTemporary"), this.$y = a, this.j("isTemporary", b, a))
                });
        t.g(ae, "visible", ae.prototype.visible);
        t.defineProperty(ae, {visible: "visible"}, function() {
        return this.Dz
                }, function(a) {
        var b = this.Dz;
                if (b !== a) {
        t.i(a, "boolean", ae, "visible");
                this.Dz = a;
                this.j("visible", b, a);
                for (b = this.Fb.k; b.next(); )
                b.value.gh(a);
                a = this.h;
                null !== a && a.ka()
                }
        });
        t.g(ae, "pickable", ae.prototype.zf);
        t.defineProperty(ae, {zf: "pickable"}, function() {
        return this.Qk
                }, function(a) {
        var b = this.Qk;
                b !== a && (t.i(a, "boolean", ae, "pickable"), this.Qk = a, this.j("pickable", b, a))
                });
        t.g(ae, "isBoundsIncluded", ae.prototype.pA);
        t.defineProperty(ae, {pA: "isBoundsIncluded"}, function() {
        return this.Xy
                }, function(a) {
        this.Xy !== a && (this.Xy = a, null !== this.h && this.h.Mc())
                });
        t.g(ae, "allowCopy", ae.prototype.Ri);
        t.defineProperty(ae, {Ri: "allowCopy"}, function() {
        return this.kk
                }, function(a) {
        var b = this.kk;
                b !== a && (t.i(a, "boolean", ae, "allowCopy"), this.kk = a, this.j("allowCopy", b, a))
                });
        t.g(ae, "allowDelete", ae.prototype.Yk);
        t.defineProperty(ae, {Yk: "allowDelete"}, function() {
        return this.lk
                }, function(a) {
        var b = this.lk;
                b !== a && (t.i(a, "boolean", ae, "allowDelete"), this.lk = a, this.j("allowDelete", b, a))
                });
        t.g(ae, "allowTextEdit", ae.prototype.Qo);
        t.defineProperty(ae, {Qo: "allowTextEdit"}, function() {
        return this.uk
                }, function(a) {
        var b = this.uk;
                b !== a && (t.i(a, "boolean", ae, "allowTextEdit"), this.uk = a, this.j("allowTextEdit", b, a))
                });
        t.g(ae, "allowGroup", ae.prototype.Mo);
        t.defineProperty(ae, {Mo: "allowGroup"}, function() {
        return this.mk
                }, function(a) {
        var b = this.mk;
                b !== a && (t.i(a, "boolean", ae, "allowGroup"), this.mk = a, this.j("allowGroup", b, a))
                });
        t.g(ae, "allowUngroup", ae.prototype.Ro);
        t.defineProperty(ae, {Ro: "allowUngroup"}, function() {
        return this.vk
                }, function(a) {
        var b = this.vk;
                b !== a && (t.i(a, "boolean", ae, "allowUngroup"), this.vk = a, this.j("allowUngroup", b, a))
                });
        t.g(ae, "allowLink", ae.prototype.zm);
        t.defineProperty(ae, {zm: "allowLink"}, function() {
        return this.nk
                }, function(a) {
        var b = this.nk;
                b !== a && (t.i(a, "boolean", ae, "allowLink"), this.nk = a, this.j("allowLink", b, a))
                });
        t.g(ae, "allowRelink", ae.prototype.Tj);
        t.defineProperty(ae, {Tj: "allowRelink"}, function() {
        return this.pk
                }, function(a) {
        var b = this.pk;
                b !== a && (t.i(a, "boolean", ae, "allowRelink"), this.pk = a, this.j("allowRelink", b, a))
                });
        t.g(ae, "allowMove", ae.prototype.Sj);
        t.defineProperty(ae, {Sj: "allowMove"}, function() {
        return this.ok
                }, function(a) {
        var b = this.ok;
                b !== a && (t.i(a, "boolean", ae, "allowMove"), this.ok = a, this.j("allowMove", b, a))
                });
        t.g(ae, "allowReshape", ae.prototype.No);
        t.defineProperty(ae, {No: "allowReshape"}, function() {
        return this.qk
                }, function(a) {
        var b = this.qk;
                b !== a && (t.i(a, "boolean", ae, "allowReshape"), this.qk = a, this.j("allowReshape", b, a))
                });
        t.g(ae, "allowResize", ae.prototype.Oo);
        t.defineProperty(ae, {Oo: "allowResize"}, function() {
        return this.rk
                }, function(a) {
        var b = this.rk;
                b !== a && (t.i(a, "boolean", ae, "allowResize"), this.rk = a, this.j("allowResize", b, a))
                });
        t.g(ae, "allowRotate", ae.prototype.Po);
        t.defineProperty(ae, {Po: "allowRotate"}, function() {
        return this.sk
                }, function(a) {
        var b = this.sk;
                b !== a && (t.i(a, "boolean", ae, "allowRotate"), this.sk = a, this.j("allowRotate", b, a))
                });
        t.g(ae, "allowSelect", ae.prototype.Pe);
        t.defineProperty(ae, {Pe: "allowSelect"}, function() {
        return this.tk
                }, function(a) {
        var b = this.tk;
                b !== a && (t.i(a, "boolean", ae, "allowSelect"), this.tk = a, this.j("allowSelect", b, a))
                });
        function z(a) {
        function b() {
        document.removeEventListener("DOMContentLoaded", b, !1);
                Vh(c)
        }
        1 < arguments.length && t.m("Diagram constructor can only take one optional argument, the DIV HTML element or its id.");
                t.Ac(this);
                t.$z = [];
                this.Wb = !0;
                this.li = new Ce;
                this.li.U = this;
                this.mf = 17;
                var c = this;
                null !== document.body ? Vh(this) : document.addEventListener("DOMContentLoaded", b, !1);
                this.Xb = new B(ae);
                this.Db = this.Eb = 0;
                this.Mb = this.Qg = this.jb = null;
                this.Rk = {};
                this.OF();
                this.Wy = {};
                this.Wy.twoTouchPan = !0;
                this.Ma = (new w(NaN,
                        NaN)).freeze();
                this.nc = 1;
                this.Pu = (new w(NaN, NaN)).freeze();
                this.Qu = NaN;
                this.ev = 1E-4;
                this.bv = 100;
                this.ld = new ha;
                this.Vv = (new w(NaN, NaN)).freeze();
                this.Gu = (new x(NaN, NaN, NaN, NaN)).freeze();
                this.Fl = Ye;
                this.An = xb;
                this.Gk = Ye;
                this.Yn = xb;
                this.Ru = this.Ou = Eb;
                this.cg = new C(Q);
                this.ve = !0;
                this.Mn = new ja(V, x);
                this.Nn = !0;
                this.fH = 250;
                this.Gl = null;
                this.lu = (new ab(16, 16, 16, 16)).freeze();
                this.Au = this.Kf = !1;
                this.Rn = !0;
                this.Ck = new ld;
                this.Cd = new ld;
                this.ec = new ld;
                this.qj = null;
                this.Lv = - 1;
                this.vz = !1;
                this.Fy = new ja("string",
                        B);
                this.Ey = new ja("string", "string");
                Wh(this);
                this.ov = new C(S);
                this.Tk = new C(T);
                this.Yu = new C(V);
                this.Fb = new C(E);
                this.Tu = !0;
                this.mC = !1;
                this.Sv = eg;
                this.yj = 10;
                this.yy = this.Cy = this.Qv = null;
                this.wy = "";
                this.Fq = "auto";
                this.qi = this.Ni = this.Ai = this.hv = this.Bi = this.Ci = this.Di = this.pi = this.ti = this.ni = null;
                this.vi = !0;
                this.hz = !1;
                this.my = null;
                this.Uu = this.un = this.Dy = this.zo = this.cD = this.Ki = !1;
                this.xC = !0;
                this.zd = !1;
                this.ie = null;
                var d = this;
                this.EC = function(a) {
                if (a.ba === d.ba && d.Na) {
                d.Na = !1;
                        try {
                        var b = a.td;
                                "" === a.yf &&
                                b === vd && Xh(d, a.object, a.propertyName)
                        } finally {
                d.Na = !0
                }
                }
                };
                this.FC = function(a) {
                Yh(d, a)
                };
                this.BD = !0;
                this.Sg = - 2;
                this.ri = new ja(Object, E);
                this.zk = new ja(Object, V);
                this.Xl = new ja(Object, Array);
                this.Ik = !1;
                this.lk = this.kk = this.bu = this.Le = !0;
                this.du = this.cu = !1;
                this.iu = this.gu = this.tk = this.sk = this.rk = this.qk = this.ok = this.pk = this.nk = this.fu = this.vk = this.mk = this.uk = !0;
                this.bo = this.uC = !1;
                this.hu = this.eu = this.Mu = this.Lu = !0;
                this.Cv = this.Bv = 16;
                this.oz = this.Av = !1;
                this.qz = this.pz = this.Mj = this.Lj = null;
                this.Ne = (new ab(5)).freeze();
                this.Fv = (new C(E)).freeze();
                this.cv = 999999999;
                this.Nu = (new C(E)).freeze();
                this.Hk = this.vj = this.wi = !0;
                this.Sl = this.Rl = !1;
                this.Vy = this.Uy = 0;
                this.Nd = null;
                this.ju = !0;
                this.kf = !1;
                this.Qd = null;
                this.hm = 1;
                this.Un = !1;
                this.gD = 0;
                this.qo = null;
                this.AD = (new x(NaN, NaN, NaN, NaN)).freeze();
                this.Bu = (new x(NaN, NaN, NaN, NaN)).freeze();
                this.im = new C;
                Zh(this);
                this.Xu = this.Iu = this.nv = this.VB = this.UB = this.WB = this.zj = this.Dk = this.Ei = null;
                $h(this);
                this.fd = null;
                this.Hu = !1;
                this.Bn = null;
                this.wb = new Ie;
                this.wb.initializeStandardTools();
                this.Ua = this.qw = this.wb;
                this.Se = new oa;
                this.ba = new P;
                this.Ki = !0;
                this.jc = new ce;
                this.Ki = !1;
                void 0 === a && (a = document.createElement("div"));
                this.eC = this.Hy = null;
                this.Cz = !0;
                this.nz = !1;
                this.tj = null;
                this.jg = 1;
                this.Fk = new ai;
                bi(this, a);
                this.Zl = 1;
                this.$l = 0;
                this.AC = new w;
                this.xD = 500;
                this.ku = new w;
                this.ms = null;
                this.Wb = !1
        }
t.ga("Diagram", z);
        function $h(a) {
        a.Ei = new ja("string", E);
                var b = new S, c = new na;
                c.bind(new Ee("text", "", yd));
                b.add(c);
                a.WB = b;
                a.Ei.add("", b);
                b = new S;
                c = new na;
                c.stroke = "brown";
                c.bind(new Ee("text", "", yd));
                b.add(c);
                a.Ei.add("Comment", b);
                b = new S;
                b.vl = !1;
                b.Qz = !1;
                c = new W;
                c.zb = "Ellipse";
                c.fill = "black";
                c.stroke = null;
                c.Ca = (new ga(3, 3)).Ja();
                b.add(c);
                a.Ei.add("LinkLabel", b);
                a.Dk = new ja("string", T);
                b = new T;
                b.nx = "GROUPPANEL";
                b.type = ci;
                c = new na;
                c.font = "bold 12pt sans-serif";
                c.bind(new Ee("text", "", yd));
                b.add(c);
                c = new y(di);
                c.name =
                "GROUPPANEL";
                var d = new W;
                d.zb = "Rectangle";
                d.fill = "rgba(128,128,128,0.2)";
                d.stroke = "black";
                c.add(d);
                d = new Ug;
                d.padding = (new ab(5, 5, 5, 5)).Ja();
                c.add(d);
                b.add(c);
                a.UB = b;
                a.Dk.add("", b);
                a.zj = new ja("string", V);
                b = new V;
                c = new W;
                c.ej = !0;
                b.add(c);
                c = new W;
                c.on = "Standard";
                c.fill = "black";
                c.stroke = null;
                c.fb = 0;
                b.add(c);
                a.VB = b;
                a.zj.add("", b);
                b = new V;
                c = new W;
                c.ej = !0;
                c.stroke = "brown";
                b.add(c);
                a.zj.add("Comment", b);
                b = new Ke;
                b.type = di;
                c = new W;
                c.fill = null;
                c.stroke = "dodgerblue";
                c.fb = 3;
                b.add(c);
                c = new Ug;
                c.margin = (new ab(1.5,
                        1.5, 1.5, 1.5)).Ja();
                b.add(c);
                a.nv = b;
                a.Iu = b;
                b = new Ke;
                b.type = wg;
                c = new W;
                c.ej = !0;
                c.fill = null;
                c.stroke = "dodgerblue";
                c.fb = 3;
                b.add(c);
                a.Xu = b
        }
function Vh(a) {
var b = document.createElement("p");
        b.style.width = "100%";
        b.style.height = "200px";
        b.style.boxSizing = "content-box";
        var c = document.createElement("div");
        c.style.position = "absolute";
        c.style.visibility = "hidden";
        c.style.width = "200px";
        c.style.height = "150px";
        c.style.overflow = "hidden";
        c.style.boxSizing = "content-box";
        c.appendChild(b);
        document.body.appendChild(c);
        var d = b.offsetWidth;
        c.style.overflow = "scroll";
        b = b.offsetWidth;
        d === b && (b = c.clientWidth);
        document.body.removeChild(c);
        a.mf = d - b
        }
z.prototype.toString = function(a) {
void 0 === a && (a = 0);
        var b = "";
        this.id && (b = this.id);
        this.$i && this.$i.id && (b = this.$i.id);
        b = 'Diagram "' + b + '"';
        if (0 >= a)
        return b;
        for (var c = this.Xb.k; c.next(); )
        b += "\n  " + c.value.toString(a - 1);
        return b
        };
        z.prototype.checkProperties = function() {
        return t.$H(this)
                };
        z.fromDiv = function(a) {
        var b = a;
                "string" === typeof a && (b = document.getElementById(a));
                return b instanceof HTMLDivElement && b.U instanceof z ? b.U : null
                };
        t.g(z, "div", z.prototype.$i);
        t.defineProperty(z, {$i: "div"}, function() {
        return this.Mb
                }, function(a) {
        null !== a && t.l(a, HTMLDivElement, z, "div");
                if (this.Mb !== a) {
        t.$z = [];
                var b = this.Mb;
                if (null !== b) {
        b.U = void 0;
                b.innerHTML = "";
                null !== this.jb && (this.jb.U = null, this.jb.removeEventListener("touchstart", this.CG, !1), this.jb.removeEventListener("touchmove", this.BG, !1), this.jb.removeEventListener("touchend", this.AG, !1));
                b = this.Qv;
                if (null !== b) {
        for (var c = b.HC.n, d = c.length, f = 0; f < d; f++)
                c[f].cancelWaitAfter();
                c = b.IC.n;
                d = c.length;
                for (f = 0; f < d; f++)
                c[f].cancelWaitAfter();
                c = b.JC.n;
                d = c.length;
                for (f = 0; f < d; f++)
                c[f].cancelWaitAfter()
                }
        b.cancelWaitAfter();
                this.Qg = this.jb = null;
                window.removeEventListener("resize", this.WG, !1);
                window.removeEventListener("mousemove", this.Cp, !0);
                window.removeEventListener("mousedown", this.Bp, !0);
                window.removeEventListener("mouseup", this.Ep, !0);
                window.removeEventListener("mousewheel", this.hh, !0);
                window.removeEventListener("DOMMouseScroll", this.hh, !0);
                window.removeEventListener("mouseout", this.Dp, !0);
                null !== this.qo && (this.qo = this.qo.target = null)
                } else
                this.kf =
                !1;
                this.Mb = null;
                if (null !== a) {
        if (b = a.U)
                b.$i = null;
                bi(this, a);
                this.SA()
                }
        }
        });
        function ai() {
        this.uH = "63ad05bbe23a1786468a4c741b6d2";
                this.uH === this._tk ? this.yh = !0 : ei(this, !1)
        }
function ei(a, b) {
var c = "p", d = window[t.Ha("76a715b2f73f148a")][t.Ha("72ba13b5")];
        if (t.Ha("77bb5bb2f32603de") === window[t.Ha("76a715b2f73f148a")][t.Ha("6aba19a7ec351488")])
        try {
        a.yh = !window[t.Ha("4da118b7ec2108")]([t.Ha("5bb806bfea351a904a84515e1b6d38b6")])([t.Ha("49bc19a1e6")])([t.Ha("59bd04a1e6380fa5539b")])([t.Ha("7bb8069ae7")] === t.Ha(t.Zv));
                if (!1 === a.yh)
                return;
                a.yh = !window[t.Ha("4da118b7ec2108")]([t.Ha("5bb806bfea351a904a84515e1b6d38b6")])([t.Ha("49bc19a1e6")])([t.Ha("59bd04a1e6380fa5539b6c7a197c31bb4cfd3e")])([t.Ha("7bb8069ae7")] ===
                t.Ha(t.Zv));
                if (!1 === a.yh)
                return
                } catch (f) {
}
for (var g = d[t.Ha("76ad18b4f73e")], h = d[t.Ha("73a612b6fb191d")](t.Ha("35e7")) + 2; h < g; h++)
        c += d[h];
        d = c[t.Ha("73a612b6fb191d")](t.Ha(t.Zv));
        0 >= d && t.Ha(t.Zv) !== t.Ha("7da71ca0ad381e90") && (d = c[t.Ha("73a612b6fb191d")](t.Ha("76a715b2ef3e149757")));
        a.yh = !(0 < d && d < c[t.Ha("73a612b6fb191d")](t.Ha("35")));
        a.yh && (c = document[t.Ha("79ba13b2f7333e8846865a7d00")]("div"), d = t.Ha("02cncncn"), "." === d[0] && (d = d[t.Ha("69bd14a0f724128a44")](1)), c[t.Ha("79a417a0f0181a8946")] = d, document[t.Ha("78a712aa")] ?
                (document[t.Ha("78a712aa")][t.Ha("7bb806b6ed32388c4a875b")](c), d = window[t.Ha("7dad0290ec3b0b91578e5b40007031bf")](c)[t.Ha("7dad0283f1390b81519f4645156528bf")](t.Ha("78a704b7e62456904c9b12701b6532a8")), document[t.Ha("78a712aa")][t.Ha('"68ad1bbcf533388c4a875b')](c), d && - 1 !== d.indexOf(t.Ha(t.aI)) && - 1 !== d.indexOf(t.Ha(t.bI)) && (a.yh = !1)) : (a.yh = null, b && (a.yh = !1)))
        }
ai.prototype.El = function(a) {
a.Qg.setTransform(a.jg, 0, 0, a.jg, 0, 0);
        null === this.yh && ei(this, !0);
        return 0 < this.yh && this !== this.sH ? !0 : !1
        };
        ai.prototype.t = function() {
        this.sH = null
                };
        function bi(a, b) {
        void 0 !== b && null !== b || t.m("Diagram setup requires an argument DIV.");
                null !== a.Mb && t.m("Diagram has already completed setup.");
                "string" === typeof b ? a.Mb = document.getElementById(b) : b instanceof HTMLDivElement ? a.Mb = b : t.m("No DIV or DIV id supplied: " + b);
                null === a.Mb && t.m("Invalid DIV id; could not get element with id: " + b);
                void 0 !== a.Mb.U && t.m("Invalid div id; div already has a Diagram associated with it.");
                "static" === window.getComputedStyle(a.Mb, null).position && (a.Mb.style.position = "relative");
                a.Mb.style["-webkit-tap-highlight-color"] = "rgba(255, 255, 255, 0)";
                a.Mb.style["-ms-touch-action"] = "none";
                a.Mb.innerHTML = "";
                a.Mb.U = a;
                var c = document.createElement("canvas");
                if (c.getContext && c.getContext("2d")) {
        c.innerHTML = "This text is displayed if your browser does not support the Canvas HTML element.";
                void 0 !== c.style && (c.style.position = "absolute", c.style.top = "0px", c.style.left = "0px", c.style.zIndex = "2", c.style.QK = "none", c.style.webkitUserSelect = "none", c.style.MozUserSelect = "none");
                a.Eb = a.Mb.clientWidth ||
                1;
                a.Db = a.Mb.clientHeight || 1;
                a.jb = c;
                a.Qg = c.getContext("2d");
                var d = a.Qg;
                a.jg = a.computePixelRatio();
                fi(a, a.Eb, a.Db);
                a.Vy = 0;
                a.Uy = 0;
                if (document.body) {
        var f = document.body.parentNode;
                a.Vy = f.offsetTop || 0;
                a.Uy = f.offsetLeft || 0
        } else
                document.addEventListener("load", function() {
                if (document.body) {
                var b = document.body.parentNode;
                        a.Vy = b.offsetTop || 0;
                        a.Uy = b.offsetLeft || 0
                }
                }, !1);
                c.U = a;
                a.by = d[t.Ha("7eba17a4ca3b1a8346")][t.Ha("78a118b7")](d, t.El, 4, 4);
                a.Mb.insertBefore(c, a.Mb.firstChild);
                d = document.createElement("canvas");
                d.width = 1;
                d.height = 1;
                a.Hy = d;
                a.eC = d.getContext("2d");
                var f = document.createElement("div"), g = document.createElement("div"), h = document.createElement("div"), k = document.createElement("div");
                f.style.position = "absolute";
                f.style.overflow = "auto";
                f.style.width = a.Eb + "px";
                f.style.height = a.Db + "px";
                f.style.zIndex = "1";
                g.style.position = "absolute";
                g.style.overflow = "auto";
                g.style.width = a.Eb + "px";
                g.style.height = a.Db + "px";
                g.style.zIndex = "1";
                h.style.position = "absolute";
                h.style.width = "1px";
                h.style.height = "1px";
                k.style.position =
                "absolute";
                k.style.width = "1px";
                k.style.height = "1px";
                a.Mb.appendChild(f);
                a.Mb.appendChild(g);
                f.appendChild(h);
                g.appendChild(k);
                f.onscroll = a.NC;
                f.onmousedown = a.OC;
                f.U = a;
                f.aD = !0;
                g.onscroll = a.NC;
                g.onmousedown = a.OC;
                g.U = a;
                g.bD = !0;
                a.Lj = f;
                a.Mj = g;
                a.pz = h;
                a.qz = k;
                a.CJ = t.iE(function() {
                a.ka()
                }, 300, !1);
                a.WG = t.iE(function() {
                gi(a)
                }, 250, !1);
                a.preventDefault = function(a) {
                a.preventDefault();
                        return!1
                };
                a.Cp = function(b) {
                if (a.isEnabled) {
                a.bo = !0;
                        var c = a.Cd;
                        t.Tm && c.Qw ? (b.preventDefault(), b.simulated = !0, a.ms = b) : (a.Cd = a.ec, a.ec =
                        c, qi(a, a, b, c, !0), a.eB(b, null, b.target.U) || (a.doMouseMove(), a.Ua.isBeyondDragSize() && (ri(a), a.Zl = 0)))
                }
                };
                a.Bp = function(b) {
                if (a.isEnabled) {
                a.bo = !0;
                        var c = a.Cd;
                        if (t.Tm && null !== a.ms)
                        a.ms = b, b.preventDefault();
                        else if (t.Tm && 400 > b.timeStamp - a.$l)
                        b.preventDefault();
                        else if (a.Cd = a.ec, a.ec = c, qi(a, a, b, c, !0), c.$j = !0, c.Ae = b.detail, a.Ck = c.copy(), !0 === c.Lq.simulated)
                        b.preventDefault(), b.simulated = !0;
                        else if (e && e.EF && (window.EF = a.bp(c.ea)), gf = null, a.doMouseDown(), 1 === b.button)
                        return b.preventDefault(), !1
                }
                };
                a.Ep = function(b) {
                if (a.isEnabled) {
                a.bo =
                        !0;
                        var c = a.Cd;
                        if (t.Tm) {
                if (400 > b.timeStamp - a.$l) {
                b.preventDefault();
                        return
                }
                a.$l = b.timeStamp
                }
                if (t.Tm && null !== a.ms)
                        a.ms = null, b.preventDefault();
                        else {
                        a.Cd = a.ec;
                                a.ec = c;
                                qi(a, a, b, c, !0);
                                c.lj = !0;
                                c.Ae = b.detail;
                                if (t.Nw || t.tA)
                                b.timeStamp - a.$l < a.xD && !a.Ua.isBeyondDragSize() ? a.Zl++ : a.Zl = 1, a.$l = b.timeStamp, c.Ae = a.Zl;
                                c.bubbles = b.bubbles;
                                b.target.U && (c.nh = b.target.U);
                                a.oG(b, null, new w, c.nh) || (a.doMouseUp(), uf(a), si(a, c, b))
                        }
                }
                };
                a.hh = function(b) {
                if (a.isEnabled) {
                var c = a.Cd;
                        a.Cd = a.ec;
                        a.ec = c;
                        qi(a, a, b, c, !0);
                        c.bubbles = !0;
                        c.Yj = void 0 !== b.wheelDelta ? b.wheelDelta : - 40 * b.detail;
                        a.doMouseWheel();
                        si(a, c, b)
                }
                };
                a.Dp = function() {
                if (a.isEnabled) {
                a.bo = !1;
                        var b = a.Ua;
                        b.cancelWaitAfter();
                        b instanceof Ie && b.hideToolTip()
                }
                };
                a.CG = function(b) {
                if (a.isEnabled) {
                a.vz = !1;
                        if (1 < b.touches.length) {
                a.Ua.doCancel();
                        if (a.vi) {
                a.Un = !0;
                        a.hm = a.scale;
                        var c = a.Eb, d = a.Db, f = a.jb.getBoundingClientRect(), g = b.targetTouches[0], h = g.clientX - c / f.width * f.left, k = g.clientY - d / f.height * f.top, g = b.targetTouches[1], c = g.clientX - c / f.width * f.left - h, d = g.clientY - d / f.height *
                        f.top - k, d = Math.sqrt(c * c + d * d);
                        a.gD = d;
                        b.preventDefault();
                        b.cancelBubble = !0;
                        return!1
                }
                ri(a);
                        b.cancelBubble = !1;
                        return!0
                }
                d = a.Cd;
                        a.Cd = a.ec;
                        a.ec = d;
                        d.h = a;
                        ti(a, b.targetTouches[0], d);
                        d.Yc = 0;
                        d.button = 0;
                        d.$j = !0;
                        d.lj = !1;
                        d.Ae = 1;
                        d.Yj = 0;
                        d.Ee = !1;
                        d.bubbles = !1;
                        d.event = b;
                        d.timestamp = Date.now();
                        d.nh = b.target.U ? b.target.U : null;
                        d.ae = null;
                        a.Ck = d.copy();
                        gf = null;
                        a.doMouseDown();
                        ui(a, d);
                        si(a, d, b)
                }
                };
                a.BG = function(b) {
                if (a.isEnabled) {
                if (1 < b.touches.length) {
                a.Ua.doCancel();
                        ri(a);
                        if (a.vi && a.Un && 1 < b.targetTouches.length) {
                var c = a.Eb,
                        d = a.Db, f = a.jb.getBoundingClientRect(), g = b.targetTouches[0], h = g.clientX - c / f.width * f.left, k = g.clientY - d / f.height * f.top, g = b.targetTouches[1], c = g.clientX - c / f.width * f.left, g = g.clientY - d / f.height * f.top, d = c - h, f = g - k, d = Math.sqrt(d * d + f * f) / a.gD, g = new w((Math.min(c, h) + Math.max(c, h)) / 2, (Math.min(g, k) + Math.max(g, k)) / 2), h = a.hm * d, k = a.Se;
                        h !== a.scale && k.canResetZoom(h) && (c = a.Xf, a.Xf = g, k.resetZoom(h), a.Xf = c);
                        b.preventDefault();
                        b.cancelBubble = !0;
                        return!1
                }
                b.cancelBubble = !1;
                        return!0
                }
                h = a.Cd;
                        a.Cd = a.ec;
                        a.ec = h;
                        g = k = null;
                        0 <
                        b.changedTouches.length ? g = b.changedTouches[0] : 0 < b.targetTouches.length && (g = b.targetTouches[0]);
                        h.h = a;
                        g ? ((k = document.elementFromPoint(g.clientX, g.clientY)) && k.U ? (d = g, c = k.U) : (d = b.changedTouches[0], c = a), ti(c, d, h)) : null !== a.Cd ? (h.ea = a.Cd.ea, h.Ke = a.Cd.Ke, k = a.Cd.nh) : null !== a.Ck && (h.ea = a.Ck.ea, h.Ke = a.Ck.Ke, k = a.Ck.nh);
                        h.Yc = 0;
                        h.button = 0;
                        h.$j = !1;
                        h.lj = !1;
                        h.Ae = 1;
                        h.Yj = 0;
                        h.Ee = !1;
                        h.bubbles = !1;
                        h.event = b;
                        h.timestamp = Date.now();
                        h.nh = null === k ? b.target.U : k.U ? k.U : null;
                        h.ae = null;
                        a.Ua.isBeyondDragSize() && ri(a);
                        a.eB(g ? g :
                                b, null, h.nh) || (a.doMouseMove(), si(a, h, b))
                }
                };
                a.AG = function(b) {
                if (a.isEnabled) {
                ri(a);
                        if (a.vz)
                        return b.preventDefault(), !1;
                        var c = a.Cd;
                        a.Cd = a.ec;
                        a.ec = c;
                        if (1 < b.touches.length)
                        a.vi && (a.Un = !1);
                        else {
                        var d = null, f = null;
                                0 < b.changedTouches.length ? f = b.changedTouches[0] : 0 < b.targetTouches.length && (f = b.targetTouches[0]);
                                c.h = a;
                                c.Ae = 1;
                                if (f) {
                        var d = document.elementFromPoint(f.clientX, f.clientY), g, h;
                                d && d.U ? (h = f, g = d.U) : (h = b.changedTouches[0], g = a);
                                ti(g, h, c);
                                g = f.screenX;
                                h = f.screenY;
                                var k = a.AC;
                                b.timeStamp - a.$l < a.xD && !(25 <
                                        Math.abs(k.x - g) || 25 < Math.abs(k.y - h)) ? a.Zl++ : a.Zl = 1;
                                c.Ae = a.Zl;
                                a.$l = b.timeStamp;
                                a.AC.p(g, h)
                        } else
                                d = c.nh;
                                c.Yc = 0;
                                c.button = 0;
                                c.$j = !1;
                                c.lj = !0;
                                c.Yj = 0;
                                c.Ee = !1;
                                c.bubbles = !1;
                                c.event = b;
                                c.timestamp = Date.now();
                                c.nh = null === d ? b.target.U : d.U ? d.U : null;
                                c.ae = null;
                                a.oG(f ? f : b, null, new w, c.nh) || (a.doMouseUp(), si(a, c, b))
                        }
                }
                };
                c.addEventListener("touchstart", a.CG, !1);
                c.addEventListener("touchmove", a.BG, !1);
                c.addEventListener("touchend", a.AG, !1);
                c.addEventListener("gesturestart", function() {
                !1 !== a.vi && (a.hm = a.scale, a.Ua.doCancel(),
                        a.iC = 0)
                }, !1);
                c.addEventListener("gesturechange", function(b) {
                if (!1 !== a.vi) {
                var c = b.scale;
                        a.iC++;
                        if (a.Wy.twoTouchPan) {
                if (1 === a.iC)
                        if (1.02 < c || 0.98 > c)
                        b.preventDefault();
                        else {
                        a.hm = null;
                                return
                        }
                } else
                        b.preventDefault();
                        if (null !== a.hm) {
                var d = a.Eb, f = a.Db, g = a.jb.getBoundingClientRect();
                        b = new w(b.pageX - window.scrollX - d / g.width * g.left, b.pageY - window.scrollY - f / g.height * g.top);
                        c *= a.hm;
                        d = a.Se;
                        c !== a.scale && d.canResetZoom(c) && (f = a.Xf, a.Xf = b, d.resetZoom(c), a.Xf = f)
                }
                }
                }, !1);
                window.MSGesture && (a.qo = new window.MSGesture,
                        a.qo.target = d, c.addEventListener("pointerdown", function(b) {
                        a.qo.addPointer(b.pointerId)
                        }, !1), c.addEventListener("MSGestureStart", function(b) {
                !1 !== a.vi && (a.hm = a.scale, a.Un = !0, b.preventDefault())
                }, !1), c.addEventListener("MSGestureChange", function(b) {
                if (!1 !== a.vi) {
                var c = b.scale;
                        if (1 === c)
                        b.gestureObject.stop(), b.preventDefault();
                        else {
                        a.Un && (a.Ua.doCancel(), a.Un = !1);
                                b = a.FG(a.Vn(b));
                                var c = a.scale * c, d = a.Se;
                                if (c !== a.scale && d.canResetZoom(c)) {
                        var f = a.Xf;
                                a.Xf = b;
                                d.resetZoom(c);
                                a.Xf = f
                        }
                        }
                }
                }, !1));
                c.addEventListener("mousemove",
                        a.Cp, !1);
                c.addEventListener("mousedown", a.Bp, !1);
                c.addEventListener("mouseup", a.Ep, !1);
                c.addEventListener("mousewheel", a.hh, !1);
                c.addEventListener("DOMMouseScroll", a.hh, !1);
                c.addEventListener("mouseout", a.Dp, !1);
                c.addEventListener("keydown", a.cJ, !1);
                c.addEventListener("keyup", a.dJ, !1);
                c.addEventListener("selectstart", function(a) {
                a.preventDefault();
                        return!1
                }, !1);
                c.addEventListener("contextmenu", function(a) {
                a.preventDefault();
                        return!1
                }, !1);
                window.addEventListener("resize", a.WG, !1);
                c.tabIndex = 0;
                vi(a)
        } else
                a.Mb.innerHTML =
                "This text is displayed if your browser does not support the Canvas HTML element."
        }
z.prototype.computePixelRatio = function() {
var a = this.Qg;
        return Math.round((window.devicePixelRatio || 1) / (a.webkitBackingStorePixelRatio || a.mozBackingStorePixelRatio || a.msBackingStorePixelRatio || a.oBackingStorePixelRatio || a.backingStorePixelRatio || 1))
        };
        z.prototype.doMouseMove = function() {
        this.Ua.doMouseMove()
                };
        z.prototype.doMouseDown = function() {
        this.Ua.doMouseDown()
                };
        z.prototype.doMouseUp = function() {
        this.Ua.doMouseUp()
                };
        z.prototype.doMouseWheel = function() {
        this.Ua.doMouseWheel()
                };
        z.prototype.doKeyDown = function() {
        this.Ua.doKeyDown()
                };
        z.prototype.doKeyUp = function() {
        this.Ua.doKeyUp()
                };
        function gi(a) {
        if (null !== a.jb) {
        var b = a.Mb;
                if (0 !== b.clientWidth && 0 !== b.clientHeight) {
        var c = a.Sl ? a.mf : 0, d = a.Rl ? a.mf : 0, f = a.jg;
                a.jg = a.computePixelRatio();
                a.jg !== f && (fi(a, a.Eb, a.Db), vi(a), a.Zd());
                if (b.clientWidth !== a.Eb + c || b.clientHeight !== a.Db + d)
                a.vj = !0, a.ve = !0, b = a.jc, null !== b && b.rt && b.J(), a.zd || a.Zd()
        }
        }
        }
z.prototype.focus = z.prototype.focus = function() {
this.jb && this.jb.focus()
        };
        function vi(a, b, c) {
        void 0 === b && (b = a.Qg);
                void 0 === c && (c = !0);
                c && (b.au = "");
                b.sn = "";
                b.rn = ""
        }
function Zh(a) {
var b = new ae;
        b.name = "Background";
        a.Js(b);
        b = new ae;
        b.name = "";
        a.Js(b);
        b = new ae;
        b.name = "Foreground";
        a.Js(b);
        b = new ae;
        b.name = "Adornment";
        b.yc = !0;
        a.Js(b);
        b = new ae;
        b.name = "Tool";
        b.yc = !0;
        b.pA = !0;
        a.Js(b);
        b = new ae;
        b.name = "Grid";
        b.Pe = !1;
        b.zf = !1;
        b.yc = !0;
        a.BH(b, a.bt("Background"))
        }
function wi(a) {
a.fd = new y(xi);
        a.fd.name = "GRID";
        var b = new W;
        b.zb = "LineH";
        b.stroke = "lightgray";
        b.fb = 0.5;
        b.interval = 1;
        a.fd.add(b);
        b = new W;
        b.zb = "LineH";
        b.stroke = "gray";
        b.fb = 0.5;
        b.interval = 5;
        a.fd.add(b);
        b = new W;
        b.zb = "LineH";
        b.stroke = "gray";
        b.fb = 1;
        b.interval = 10;
        a.fd.add(b);
        b = new W;
        b.zb = "LineV";
        b.stroke = "lightgray";
        b.fb = 0.5;
        b.interval = 1;
        a.fd.add(b);
        b = new W;
        b.zb = "LineV";
        b.stroke = "gray";
        b.fb = 0.5;
        b.interval = 5;
        a.fd.add(b);
        b = new W;
        b.zb = "LineV";
        b.stroke = "gray";
        b.fb = 1;
        b.interval = 10;
        a.fd.add(b);
        b = new E;
        b.add(a.fd);
        b.af = "Grid";
        b.uA = !1;
        b.oA = !1;
        b.zf = !1;
        b.Xw = "GRID";
        a.add(b);
        a.Fb.remove(b);
        a.fd.visible = !1
        }
z.prototype.NC = function() {
if (this.U.isEnabled) {
var a = this.U;
        if (a.oz && null !== a.jb) {
a.Av = !0;
        var b = a.Ed, c = a.xb, d = b.width, f = c.width, g = b.height, h = c.height, k = b.right, l = c.right, m = b.bottom, n = c.bottom, p = b.x, q = c.x, b = b.y, c = c.y, r = a.scale;
        if (f < d || h < g) {
var s = t.K();
        this.aD && a.nf ? (s.p(this.scrollLeft / r + p, a.position.y), a.position = s) : this.bD && a.of && (s.p(a.position.x, this.scrollTop / r + b), a.position = s);
        t.B(s);
        a.Av = !1;
        a.vj = !1
        } else
        s = t.K(), this.aD && a.nf && (p < q && (a.position = new w(this.scrollLeft + p, a.position.y)), k > l && (a.position =
        new w( - (a.Lj.scrollWidth - a.Eb) + this.scrollLeft - a.Eb / r + a.Ed.right, a.position.y))), this.bD && a.of && (b < c && (a.position = new w(a.position.x, this.scrollTop + b)), m > n && (a.position = new w(a.position.x, - (a.Mj.scrollHeight - a.Db) + this.scrollTop - a.Db / r + a.Ed.bottom))), t.B(s), yi(a), a.Av = !1, a.vj = !1, b = a.Ed, c = a.xb, k = b.right, l = c.right, m = b.bottom, n = c.bottom, p = b.x, q = c.x, b = b.y, c = c.y, f >= d && p >= q && k <= l && (a.pz.style.width = "1px"), h >= g && b >= c && m <= n && (a.qz.style.height = "1px")
        }
} else
        zi(this.U)
        };
        z.prototype.OC = function() {
        this.U.isEnabled ? this.U.oz = !0 : zi(this.U)
                };
        z.prototype.computeBounds = z.prototype.pf = function() {
        0 < this.cg.count && Ai(this);
                return Bi(this)
                };
        function Bi(a) {
        if (a.eA.N()) {
        var b = a.eA.copy();
                b.Xv(a.padding);
                return b
        }
        for (var c = !0, d = a.Xb.n, f = d.length, g = 0; g < f; g++) {
        var h = d[g];
                if (h.visible && (!h.yc || h.pA))
                for (var h = h.Fb.n, k = h.length, l = 0; l < k; l++) {
        var m = h[l];
                m.uA && m.Sa() && (m = m.pa, m.N() && (c ? (c = !1, b = m.copy()) : b.kj(m)))
        }
        }
        c && (b = new x(0, 0, 0, 0));
                b.Xv(a.padding);
                return b
        }
z.prototype.computePartsBounds = function(a) {
var b = null;
        for (a = a.k; a.next(); ) {
var c = a.value;
        c instanceof V || (c.rf(), null === b ? b = c.pa.copy() : b.kj(c.pa))
        }
return null === b ? new x(NaN, NaN, 0, 0) : b
        };
        function Ci(a, b) {
        if (!a.Zb.vg && (void 0 === b && (b = !1), (b || a.kf) && !a.Wb && a.Ed.N() && null !== a.jb)) {
        a.Wb = !0;
                var c = a.Fl;
                b && a.Gk !== Ye && (c = a.Gk);
                var d = c !== Ye ? Di(a, c) : a.scale, c = a.xb.copy(), f = a.Eb / d, g = a.Db / d, h = null, k = a.Zb;
                k.sd && (h = a.Ma.copy());
                a.position.La();
                var l = a.An;
                b && a.Yn.vd() && (l = a.Yn);
                Ei(a, a.Ma, a.Ed, f, g, l);
                a.position.freeze();
                null !== h && Ph(k, h, a.Ma);
                a.scale = d;
                a.Wb = !1;
                d = a.xb;
                d.sf(c) || a.Dt(c, d)
        }
        }
function Di(a, b) {
if (null !== a.jb) {
a.wi && Fi(a, a.pf());
        var c = a.Se.Xs, d = a.Ed;
        if (!d.N())
        return c;
        var f = d.width, d = d.height, g = a.Eb, h = a.Db, k = g / f, l = h / d;
        return b === Gi ? (f = Math.min(l, k), f > c && (f = c), f < a.Ag && (f = a.Ag), f > a.yg && (f = a.yg), f) : b === Hi ? (f = l > k ? (h - a.mf) / d : (g - a.mf) / f, f > c && (f = c), f < a.Ag && (f = a.Ag), f > a.yg && (f = a.yg), f) : a.scale
        }
}
z.prototype.zoomToFit = z.prototype.zoomToFit = function() {
this.scale = Di(this, Gi)
        };
        z.prototype.zoomToRect = function(a, b) {
        void 0 === b && (b = Gi);
                var c = a.width, d = a.height;
                if (!(0 === c || 0 === d || isNaN(c) && isNaN(d))) {
        var f = 1;
                if (b === Gi || b === Hi)
                if (isNaN(c))
                f = this.xb.height * this.scale / d;
                else if (isNaN(d))
                f = this.xb.width * this.scale / c;
                else
                var f = this.Eb, g = this.Db, f = b === Hi ? g / d > f / c ? (g - (this.Rl ? this.mf : 0)) / d : (f - (this.Sl ? this.mf : 0)) / c : Math.min(g / d, f / c);
                this.scale = f;
                this.position = new w(a.x, a.y)
                }
        };
        z.prototype.alignDocument = function(a, b) {
        this.wi && Fi(this, this.pf());
                var c = this.Ed, d = this.xb, f = this.Wb;
                this.Wb = !0;
                this.position = new w(c.x + (a.x * c.width + a.offsetX) - (b.x * d.width - b.offsetX), c.y + (a.y * c.height + a.offsetY) - (b.y * d.height - b.offsetY));
                this.Wb = f;
                this.ka()
                };
        function Ei(a, b, c, d, f, g) {
        var h;
                h = b.x;
                var k = b.y;
                g.vd() && (d > c.width && (h = c.x + (g.x * c.width + g.offsetX) - (g.x * d - g.offsetX)), f > c.height && (k = c.y + (g.y * c.height + g.offsetY) - (g.y * f - g.offsetY)));
                d < c.width ? (h = Math.min(h + d / 2, c.right - d / 2), h = Math.max(h, c.left + d / 2), h -= d / 2) : h > c.left ? h = c.left : h < c.right - d && (h = c.right - d);
                f < c.height ? (d = Math.min(k + f / 2, c.bottom - f / 2), d = Math.max(d, c.top + f / 2), k = d - f / 2) : k > c.top ? k = c.top : k < c.bottom - f && (k = c.bottom - f);
                b.x = isFinite(h) ? h : - a.padding.left;
                b.y = isFinite(k) ? k : - a.padding.top
        }
z.prototype.findPartAt = z.prototype.dt = function(a, b) {
var c = b ? Uf(this, a, function(a) {
return a.S
        }, function(a) {
return a.canSelect()
        }) : Uf(this, a, function(a) {
return a.S
        });
        return c instanceof E ? c : null
        };
        z.prototype.findObjectAt = z.prototype.ne = function(a, b, c) {
        void 0 === b && (b = null);
                void 0 === c && (c = null);
                var d = this.Xb.Wm;
                for (Ai(this); d.next(); ) {
        var f = d.value;
                if (f.visible && (f = f.ne(a, b, c), null !== f))
                return f
                }
        return null
                };
        function Uf(a, b, c, d) {
        void 0 === c && (c = null);
                void 0 === d && (d = null);
                var f = a.Xb.Wm;
                for (Ai(a); f.next(); )
                if (a = f.value, a.visible && !a.yc && (a = a.ne(b, c, d), null !== a))
                return a;
                return null
        }
z.prototype.findObjectsAt = z.prototype.bp = function(a, b, c, d) {
void 0 === b && (b = null);
        void 0 === c && (c = null);
        d instanceof B || d instanceof C || (d = new C(Q));
        Ai(this);
        for (var f = this.Xb.Wm; f.next(); ) {
var g = f.value;
        g.visible && g.bp(a, b, c, d)
        }
return d
        };
        z.prototype.findObjectsIn = z.prototype.ak = function(a, b, c, d, f) {
        void 0 === b && (b = null);
                void 0 === c && (c = null);
                void 0 === d && (d = !1);
                f instanceof B || f instanceof C || (f = new C(Q));
                Ai(this);
                for (var g = this.Xb.Wm; g.next(); ) {
        var h = g.value;
                h.visible && h.ak(a, b, c, d, f)
                }
        return f
                };
        z.prototype.cA = function(a, b, c, d, f, g) {
        var h = new C(Q);
                Ai(this);
                for (var k = this.Xb.Wm; k.next(); ) {
        var l = k.value;
                l.visible && l.cA(a, b, c, d, h, f, g)
                }
        return h
                };
        z.prototype.findObjectsNear = z.prototype.Pm = function(a, b, c, d, f, g) {
        void 0 === c && (c = null);
                void 0 === d && (d = null);
                void 0 === f && (f = !0);
                if (!1 !== f && !0 !== f) {
        if (f instanceof B || f instanceof C)
                g = f;
                f = !0
                }
        g instanceof B || g instanceof C || (g = new C(Q));
                Ai(this);
                for (var h = this.Xb.Wm; h.next(); ) {
        var k = h.value;
                k.visible && k.Pm(a, b, c, d, f, g)
                }
        return g
                };
        function ri(a) {
        - 1 !== a.Lv && (clearTimeout(a.Lv), a.Lv = - 1)
        }
function ui(a, b) {
var c = b.copy();
        a.Lv = setTimeout(function() {
        c.button = 2;
                a.R = c;
                a.vz = !0;
                a.doMouseUp()
                }, 850)
        }
z.prototype.acceptEvent = function(a) {
var b = this.Cd;
        this.Cd = this.ec;
        this.ec = b;
        qi(this, this, a, b, a instanceof MouseEvent);
        return b
        };
        function qi(a, b, c, d, f) {
        d.h = b;
                f ? ti(a, c, d) : (d.Ke = b.ec.Ke, d.ea = b.ec.ea);
                a = 0;
                c.ctrlKey && (a += 1);
                c.altKey && (a += 2);
                c.shiftKey && (a += 4);
                c.metaKey && (a += 8);
                d.Yc = a;
                d.button = c.button;
                t.Um && 0 === c.button && c.ctrlKey && (d.button = 2);
                d.$j = !1;
                d.lj = !1;
                d.Ae = 1;
                d.Yj = 0;
                d.Ee = !1;
                d.bubbles = !1;
                d.event = c;
                d.timestamp = Date.now();
                d.nh = c.target.U ? c.target.U : null;
                d.ae = null
        }
function si(a, b, c) {
if (b.bubbles)
        return e && e.PE && t.trace("NOT handled " + c.type + " " + b.toString()), !0;
        e && e.PE && t.trace("handled " + c.type + " " + a.Ua.name + " " + b.toString());
        void 0 !== c.stopPropagation && c.stopPropagation();
        (void 0 === c.touches || 2 > c.touches.length) && c.preventDefault();
        c.cancelBubble = !0;
        return!1
        }
z.prototype.cJ = function(a) {
if (this.U.isEnabled) {
var b = this.U.ec;
        qi(this.U, this.U, a, b, !1);
        b.key = String.fromCharCode(a.which);
        b.$j = !0;
        switch (a.which) {
case 33:
        b.key = "PageUp";
        break;
        case 34:
        b.key = "PageDown";
        break;
        case 35:
        b.key = "End";
        break;
        case 36:
        b.key = "Home";
        break;
        case 37:
        b.key = "Left";
        break;
        case 38:
        b.key = "Up";
        break;
        case 39:
        b.key = "Right";
        break;
        case 40:
        b.key = "Down";
        break;
        case 45:
        b.key = "Insert";
        break;
        case 46:
        b.key = "Del";
        break;
        case 48:
        b.key = "0";
        break;
        case 187:
        case 61:
        case 107:
        b.key = "Add";
        break;
        case 189:
        case 173:
        case 109:
        b.key =
        "Subtract";
        break;
        case 27:
        b.key = "Esc"
        }
this.U.doKeyDown();
        return 187 !== a.which && 189 !== a.which && 48 !== a.which && 107 !== a.which && 109 !== a.which && 61 !== a.which && 173 !== a.which || !0 !== a.ctrlKey ? si(this.U, b, a) : (a.cancelBubble = !0, a.preventDefault(), a.stopPropagation(), !1)
        }
};
        z.prototype.dJ = function(a) {
        if (this.U.isEnabled) {
        var b = this.U.ec;
                qi(this.U, this.U, a, b, !1);
                b.key = String.fromCharCode(a.which);
                b.lj = !0;
                switch (a.which) {
        case 33:
                b.key = "PageUp";
                break;
                case 34:
                b.key = "PageDown";
                break;
                case 35:
                b.key = "End";
                break;
                case 36:
                b.key = "Home";
                break;
                case 37:
                b.key = "Left";
                break;
                case 38:
                b.key = "Up";
                break;
                case 39:
                b.key = "Right";
                break;
                case 40:
                b.key = "Down";
                break;
                case 45:
                b.key = "Insert";
                break;
                case 46:
                b.key = "Del"
                }
        this.U.doKeyUp();
                return si(this.U, b, a)
                }
        };
        z.prototype.Vn = function(a) {
        var b = this.jb;
                if (null === b)
                return new w(0, 0);
                var c = this.Eb, d = this.Db, b = b.getBoundingClientRect(), c = a.clientX - c / b.width * b.left;
                a = a.clientY - d / b.height * b.top;
                return null !== this.ld ? (a = new w(c, a), Qa(a, this.ld), a) : new w(c, a)
                };
        function ti(a, b, c) {
        var d = a.jb, f = a.Eb, g = a.Db, h = 0, k = 0;
                null !== d && (d = d.getBoundingClientRect(), h = b.clientX - f / d.width * d.left, k = b.clientY - g / d.height * d.top);
                c.Ke.p(h, k);
                null !== a.ld ? (b = t.lc(h, k), a.ld.ai(b), c.ea.assign(b), t.B(b)) : c.ea.p(h, k)
        }
z.prototype.invalidateDocumentBounds = z.prototype.Mc = function() {
this.wi || (this.wi = !0, this.Zd())
        };
        function Ii(a) {
        a.zd || Ai(a);
                a.wi && Fi(a, a.pf());
                Ci(a);
                for (a = a.im.k; a.next(); )
                Ii(a.value)
        }
z.prototype.redraw = z.prototype.SA = function() {
this.Wb || this.zd || (this.ka(), Ji(this), yi(this), this.Mc(), this.zg())
        };
        z.prototype.isUpdateRequested = function() {
        return this.Kf
                };
        z.prototype.delayInitialization = function(a) {
        var b = this.Zb, c = b.isEnabled;
                b.isEnabled = !1;
                Kh(this);
                this.kf = !1;
                b.isEnabled = c;
                a && setTimeout(a, 1)
                };
        z.prototype.requestUpdate = z.prototype.Zd = function(a) {
        void 0 === a && (a = !1);
                if (!0 !== this.Kf && !(this.Wb || !1 === a && this.zd)) {
        this.Kf = !0;
                var b = this;
                requestAnimationFrame(function() {
                b.Kf && b.zg()
                        })
                }
        };
        z.prototype.maybeUpdate = z.prototype.zg = function() {
        if (!this.Rn || this.Kf)
                this.Rn && (this.Rn = !1), Kh(this)
                };
        function Kh(a) {
        if (!a.zd && (a.Kf = !1, null !== a.Mb)) {
        a.zd = !0;
                var b = a.li, c = !1, d = !1;
                b.vg ? (d = !0, c = a.Wa, a.Wa = !0) : b.sd || gi(a);
                a.Wb || b.vg || !a.vj || zi(a) || zi(a);
                null !== a.fd && (a.fd.visible && !a.Hu && (Ki(a), a.Hu = !0), !a.fd.visible && a.Hu && (a.Hu = !1));
                Li(a);
                Ai(a);
                var f = !1;
                if (!a.kf || a.ju)
                a.kf ? Mi(a, !a.Au) : (a.tc("Initial Layout"), !1 === b.isEnabled && b.mn(), Mi(a, !1)), f = !0;
                a.Au = !1;
                Ai(a);
                a.zo || b.vg || Ii(a);
                f && (a.kf || (Ni(a), Ki(a)), a.Ba("LayoutCompleted"));
                Ai(a);
                a.Wb || b.vg || !a.vj || zi(a) || (zi(a), Ai(a));
                f && !a.kf && (a.kf = !0, a.Ce("Initial Layout"),
                        a.Wa || a.ja.clear(), setTimeout(function() {
                a.fh = !1
                }, 1));
                a.Ue();
                d && (a.Wa = c);
                a.zd = !1
        }
        }
function Ni(a) {
if (a.Gk !== Ye)
        a.scale = Di(a, a.Gk);
        else if (a.Fl !== Ye)
        a.scale = Di(a, a.Fl);
        else {
        var b = a.WE;
                isFinite(b) && 0 < b && (a.scale = b)
                }
a.wi && Fi(a, a.pf());
        b = a.VE;
        if (b.N())
        a.position = b;
        else {
        b = t.K();
                b.Nt(a.Ed, a.UE);
                var c = a.xb, c = t.hk(0, 0, c.width, c.height), d = t.K();
                d.Nt(c, a.XE);
                a.position = new w(b.x - d.x, b.y - d.y);
                t.hc(c);
                t.B(d);
                t.B(b);
                Ci(a, !0)
                }
a.Ba("InitialLayoutCompleted")
        }
function Ai(a) {
if ((a.zd || !a.Zb.vg) && 0 !== a.cg.count)
        for (var b = 0; 23 > b; b++) {
var c = a.cg.k;
        if (null === c || 0 === a.cg.count)
        break;
        a.cg = new C(Q);
        var d = a, f = a.cg;
        for (c.reset(); c.next(); ) {
var g = c.value;
        !g.Jd() || g instanceof T || (g.nl() ? (ih(g, Infinity, Infinity), g.Jc()) : f.add(g))
        }
for (c.reset(); c.next(); )
        g = c.value, g instanceof T && Oi(d, g);
        for (c.reset(); c.next(); )
        d = c.value, d instanceof V && (d.nl() ? (ih(d, Infinity, Infinity), d.Jc(), d.Yw()) : f.add(d));
        for (c.reset(); c.next(); )
        d = c.value, d instanceof Ke && (d.nl() ? (ih(d, Infinity,
                Infinity), d.Jc()) : f.add(d))
        }
}
function Oi(a, b) {
for (var c = b.Xc, d = t.Cb(); c.next(); ) {
var f = c.value;
        f.Sa() && (f instanceof T ? (Pi(f) || Qi(f) || Ri(f)) && Oi(a, f) : f instanceof V ? d.push(f) : (ih(f, Infinity, Infinity), f.Jc()))
        }
c = d.length;
        for (f = 0; f < c; f++) {
var g = d[f];
        ih(g, Infinity, Infinity);
        g.Jc()
        }
t.ya(d);
        ih(b, Infinity, Infinity);
        b.Jc()
        }
z.prototype.Vf = function(a, b, c, d) {
var f = this.li;
        if (this.Hk || f.vg)
        for (f = 0; f < b; f++)
        a[f].Vf(c, d)
        };
        z.prototype.Ue = function(a, b) {
        null === this.Mb && t.m("No div specified");
                var c = this.jb;
                null === c && t.m("No canvas specified");
                if (this.li.sd)
                0 === this.ja.Je && this.Zd(!0);
                else {
                a || (a = this.Qg);
                        var d = a !== this.Qg, f = this.Xb.n, g = f.length, h = this;
                        this.Vf(f, g, h);
                        if (d)
                        vi(this, a), yi(this);
                        else if (!this.ve && void 0 === b)
                        return;
                        var k = this.Ma, g = this.nc, l = Math.round(k.x * g) / g, m = Math.round(k.y * g) / g, n = this.ld;
                        n.reset();
                        1 !== g && n.scale(g);
                        0 === k.x && 0 === k.y || n.translate( - l, - m);
                        var p = this.tj;
                        if (k = null !== p && 0 < p.length && !0 === this.nz) {
                m =
                        t.Nw;
                        a.save();
                        a.beginPath();
                        g = p.length;
                        for (l = 0; l < g; l++) {
                var q = p[l];
                        if (0 !== q[2] || 0 !== q[3])
                        q = Si(this, q), a.rect(Math.floor(q[0]) - 1, Math.floor(q[1]) - 1, Math.ceil(q[2]) + 2, Math.ceil(q[3]) + 2), m && a.clearRect(Math.floor(q[0]) - 1, Math.floor(q[1]) - 1, Math.ceil(q[2]) + 2, Math.ceil(q[3]) + 2)
                        }
                a.clip()
                        }
                g = this.jg;
                        t.Tm ? (c.width = c.width, k = !1, vi(this, a), a.scale(g, g)) : (a.setTransform(1, 0, 0, 1, 0, 0), a.scale(g, g), a.clearRect(0, 0, this.Eb, this.Db));
                        a.miterLimit = 9;
                        a.setTransform(1, 0, 0, 1, 0, 0);
                        a.scale(g, g);
                        a.transform(n.m11, n.m12,
                                n.m21, n.m22, n.dx, n.dy);
                        e && e.Rz && e.yI(this, a);
                        c = b ? function(c) {
                        var d = a;
                                if (c.visible) {
                        d.globalAlpha = c.If;
                                var f = c.Fb;
                                c = c.tv;
                                c.length = 0;
                                for (var g = h.scale, k = f.length, l = 0; l < k; l++) {
                        var m = f.n[l];
                                if (Qh(m) && !b.contains(m)) {
                        if (m instanceof V && (m.ic && c.push(m), !1 === m.og))
                                continue;
                                var n = m.pa;
                                1 < n.width * g || 1 < n.height * g ? m.Ue(d, h) : Sh(m, d)
                                }
                        }
                        d.globalAlpha = 1
                                }
                        } : k ? function(b) {
                Th(b, a, h, p)
                        } : function(b) {
                b.Ue(a, h)
                        };
                        Ti(this, a);
                        g = f.length;
                        for (l = 0; l < g; l++)
                        c(f[l]);
                        this.tj = [];//aqui borre mensaje de agua
                        this.Fk ? this.Fk.El(this)  : this.Vn = function() {
                };
                        k && (a.restore(), vi(this, a), e && e.uK && e.tK(p, a, this));
                        d ? (vi(this), yi(this)) : this.ve = this.Hk = !1
                        }
        };
        function Ui(a, b, c, d, f) {
        null === a.Mb && t.m("No div specified");
                var g = a.jb;
                null === g && t.m("No canvas specified");
                var h = a.Qg;
                if (a.ve) {
        var k = a.jg;
                t.Tm ? (g.width = g.width, vi(a, h)) : (h.setTransform(1, 0, 0, 1, 0, 0), h.clearRect(0, 0, a.Eb * k, a.Db * k));
                h.UG = !1;
                h.TE = !1;
                h.drawImage(a.Hy, 0 < d ? 0 : Math.round( - d), 0 < f ? 0 : Math.round( - f));
                f = a.Ma;
                var g = a.nc, l = Math.round(f.x * g) / g, m = Math.round(f.y * g) / g;
                d = a.ld;
                d.reset();
                1 !== g && d.scale(g);
                0 === f.x && 0 === f.y || d.translate( - l, - m);
                h.save();
                h.beginPath();
                f = c.length;
                for (g = 0; g < f; g++)
                l = c[g], 0 !==
                l[2] && 0 !== l[3] && h.rect(Math.floor(l[0]), Math.floor(l[1]), Math.ceil(l[2]), Math.ceil(l[3]));
                h.clip();
                h.setTransform(1, 0, 0, 1, 0, 0);
                h.scale(k, k);
                h.transform(d.m11, d.m12, d.m21, d.m22, d.dx, d.dy);
                e && e.Rz && e.yI(a, h);
                c = a.Xb.n;
                f = c.length;
                a.Vf(c, f, a);
                Ti(a, h);
                for (g = 0; g < f; g++)
                Th(c[g], h, a, b);
                h.restore();
                vi(a);
                a.Fk ? a.Fk.El(a) : a.Vn = function() {
        };
                a.Hk = !1;
                a.ve = !1;
                a.CJ()
        }
        }
function Vi(a, b, c, d, f, g, h, k, l, m) {
null === a.Mb && t.m("No div specified");
        null === a.jb && t.m("No canvas specified");
        vi(a);
        yi(a);
        var n = void 0;
        g && d && f && (n = new x(g.x, g.y, d.width / f, d.height / f));
        var p = n.copy();
        p.Xv(c);
        Ki(a, p);
        Ai(a);
        var p = a.Xb.n, q = p.length;
        a.Vf(p, q, a, n);
        var r = a.jg;
        b.setTransform(1, 0, 0, 1, 0, 0);
        b.scale(r, r);
        b.clearRect(0, 0, d.width, d.height);
        k && (b.fillStyle = k, b.fillRect(0, 0, d.width, d.height));
        d = t.oh();
        d.reset();
        d.translate(c.left, c.top);
        d.scale(f);
        0 === g.x && 0 === g.y || d.translate( - g.x, - g.y);
        b.setTransform(d.m11,
                d.m12, d.m21, d.m22, d.dx, d.dy);
        t.We(d);
        Ti(a, b);
        if (h) {
var s = new C;
        c = h.k;
        for (c.reset(); c.next(); )
        f = c.value.S, !1 === m && "Grid" === f.layer.name || null === f || s.add(f);
        c = function(c) {
        var d = l;
                if (c.visible && (void 0 === d && (d = !0), d || !c.yc)) {
        b.globalAlpha = c.If;
                d = c.Fb;
                c = c.tv;
                c.length = 0;
                for (var f = a.scale, g = d.length, h = 0; h < g; h++) {
        var k = d.n[h];
                if (Qh(k) && s.contains(k)) {
        if (k instanceof V && (k.ic && c.push(k), !1 === k.og))
                continue;
                var m = k.pa;
                1 < m.width * f || 1 < m.height * f ? k.Ue(b, a) : Sh(k, b)
                }
        }
        b.globalAlpha = 1
                }
        }
} else if (!l && m) {
var u = a.kp.S,
        v = u.layer;
        c = function(c) {
        c === v ? u.Ue(b, a) : c.Ue(b, a, n, l, m)
                }
} else
        c = function(c) {
        c.Ue(b, a, n, l, m)
                };
        for (f = 0; f < q; f++)
        c(p[f]);
        a.Fk ? a.Fk.El(a)  : a.Vn = function() {
};
        vi(a);
        yi(a);
        a.Vf(p, q, a);
        Ki(a)
        }
z.prototype.getRenderingHint = function(a) {
return this.Rk[a]
        };
        z.prototype.setRenderingHint = z.prototype.MJ = function(a, b) {
        this.Rk[a] = b;
                this.SA()
                };
        z.prototype.resetRenderingHints = z.prototype.OF = function() {
        this.Rk = {drawShadows: !0}
        };
        function Ti(a, b) {
        var c = a.Rk;
                if (null !== c) {
        if (void 0 !== c.imageSmoothingEnabled) {
        var d = !!c.imageSmoothingEnabled;
                b.TE = d;
                b.UG = d;
                b.GK = d
        }
        c = c.defaultFont;
                void 0 !== c && null !== c && (b.font = c, b.au = c)
        }
        }
z.prototype.setInputOption = function(a, b) {
this.Wy[a] = b
        };
        function Li(a) {
        if (0 === a.ja.Je && 0 < a.Mn.count) {
        for (var b = a.Mn.k; b.next(); ) {
        var c = b.key, d = b.value;
                c.Ye();
                Ag(c, d)
        }
        a.Mn.clear()
        }
        }
z.prototype.ka = function(a, b) {
if (this.nz && void 0 !== a && null !== this.tj) {
var c = this.xb;
        if (a && c.Qf(a) || b && c.Qf(b))
        null !== this.tj && (a && a.N() && Wi(this, a.x - 2, a.y - 2, a.width + 4, a.height + 4), b && b.N() && Wi(this, b.x - 2, b.y - 2, b.width + 4, b.height + 4)), this.ve = !0, this.Zd()
        } else
        this.tj = null, this.ve = !0, this.Zd();
        for (c = this.im.k; c.next(); )
        c.value.ka(a, b)
        };
        t.g(z, "viewportOptimizations", z.prototype.bK);
        t.defineProperty(z, {bK: null}, function() {
        return this.Cz
                }, function(a) {
        t.i(a, "boolean", z, "viewportOptimizations");
                this.tj = null;
                this.Cz = a
                });
        function Wi(a, b, c, d, f) {
        b = Math.floor(b);
                c = Math.floor(c);
                d = Math.ceil(d);
                f = Math.ceil(f);
                for (var g = a.tj, h = g.length, k = 0; k < h; k++) {
        var l = g[k];
                if (b >= l[0] && c >= l[1] && b + d <= l[0] + l[2] && c + f <= l[1] + l[3])
                return!1;
                b <= l[0] && c <= l[1] && b + d >= l[0] + l[2] && c + f >= l[1] + l[3] ? (g[k][2] = 0, g[k][3] = 0) : b >= l[0] && b < l[0] + l[2] && c >= l[1] && c + f <= l[1] + l[3] ? (d = b + d - (l[0] + l[2]), b = l[0] + l[2], k = - 1) : b + d > l[0] && b + d <= l[0] + l[2] && c >= l[1] && c + f <= l[1] + l[3] ? (d = l[0] - b, k = - 1) : b >= l[0] && b + d <= l[0] + l[2] && c >= l[1] && c < l[1] + l[3] ? (f = c + f - (l[1] + l[3]), c = l[1] + l[3], k = - 1) : b >=
                l[0] && b + d <= l[0] + l[2] && c + f > l[1] && c + f <= l[1] + l[3] ? (f = l[1] - c, k = - 1) : g[k][0] >= b && g[k][0] < b + d && g[k][1] >= c && g[k][1] + g[k][3] <= c + f ? (g[k][2] -= b + d - g[k][0], g[k][0] = b + d, k = - 1) : g[k][0] + g[k][2] > b && g[k][0] + g[k][2] <= b + d && g[k][1] >= c && g[k][1] + g[k][3] <= c + f ? (g[k][2] = b - g[k][0], k = - 1) : g[k][0] >= b && g[k][0] + g[k][2] <= b + d && g[k][1] >= c && g[k][1] < c + f ? (g[k][3] -= c + f - g[k][1], g[k][1] = c + f, k = - 1) : g[k][0] >= b && g[k][0] + g[k][2] <= b + d && g[k][1] + g[k][3] > c && g[k][1] + g[k][3] <= c + f && (g[k][3] = c - g[k][1], k = - 1)
        }
        for (k = 0; k < h; k++)
                if (l = g[k], 0 < d && 0 < f && 0 < l[2] &&
                        0 < l[3] && (Math.max(b + d, l[0] + l[2]) - Math.min(b, l[0])) * (Math.max(c + f, l[1] + l[3]) - Math.min(c, l[1])) < d * f + l[2] * l[3] + 50) {
        var h = Math.min(l[0], b), m = Math.min(l[1], c);
                b = Math.max(b + d, l[0] + l[2]) - Math.min(l[0], b);
                c = Math.max(c + f, l[1] + l[3]) - Math.min(l[1], c);
                g[k][2] = 0;
                g[k][3] = 0;
                return Wi(a, h, m, b, c)
        }
        g.push([b, c, d, f]);
                return!0
        }
function Xi(a, b, c) {
if (!0 !== a.ve) {
a.ve = !0;
        if (a instanceof Yi)
        Zi(a);
        else if (!0 === a.Cz && c.width === b.width && c.height === b.height) {
var d = a.scale, f = t.Df(), g = Math.max(b.x, c.x), h = Math.max(b.y, c.y), k = Math.min(b.x + b.width, c.x + c.width), l = Math.min(b.y + b.height, c.y + c.height);
        f.x = g;
        f.y = h;
        f.width = Math.max(0, k - g) * d;
        f.height = Math.max(0, l - h) * d;
        if (0 < f.width && 0 < f.height) {
if (!a.zd && (a.Kf = !1, null !== a.Mb)) {
a.zd = !0;
        Li(a);
        Ai(a);
        a.Ed.N() || Fi(a, a.pf());
        var m = a.jb;
        if (null !== m) {
k = a.jg;
        g = a.Eb * k;
        h = a.Db * k;
        l = a.scale * k;
        d = Math.round(Math.round(c.x *
                l) - Math.round(b.x * l));
        b = Math.round(Math.round(c.y * l) - Math.round(b.y * l));
        c = a.Hy;
        var n = a.eC;
        c.width = g;
        c.height = h;
        c = 190 * a.jg;
        var l = 70 * a.jg, p = Math.max(d, 0), q = Math.max(b, 0), r = g - p, s = h - q;
        n.UG = !1;
        n.TE = !1;
        n.drawImage(m, p, q, r, s, 0, 0, r, s);
        a.Fk.El(a) && n.clearRect(0, 0, c, l);
        var m = t.Cb(), n = t.Cb(), s = Math.abs(d), r = Math.abs(b), u = 0 === p ? 0 : g - s, p = t.lc(u, 0), s = t.lc(s + u, h);
        n.push([Math.min(p.x, s.x), Math.min(p.y, s.y), Math.abs(p.x - s.x), Math.abs(p.y - s.y)]);
        var v = a.ld;
        v.reset();
        v.scale(k, k);
        1 !== a.nc && v.scale(a.nc);
        k = a.Ma;
        (0 !==
                k.x || 0 !== k.y) && isFinite(k.x) && isFinite(k.y) && v.translate( - k.x, - k.y);
        Qa(p, v);
        Qa(s, v);
        m.push([Math.min(p.x, s.x), Math.min(p.y, s.y), Math.abs(p.x - s.x), Math.abs(p.y - s.y)]);
        u = 0 === q ? 0 : h - r;
        p.p(0, u);
        s.p(g, r + u);
        n.push([Math.min(p.x, s.x), Math.min(p.y, s.y), Math.abs(p.x - s.x), Math.abs(p.y - s.y)]);
        Qa(p, v);
        Qa(s, v);
        m.push([Math.min(p.x, s.x), Math.min(p.y, s.y), Math.abs(p.x - s.x), Math.abs(p.y - s.y)]);
        a.Fk.El(a) && (g = 0 < d ? 0 : - d, h = 0 < b ? 0 : - b, p.p(g, h), s.p(c + g, l + h), n.push([Math.min(p.x, s.x), Math.min(p.y, s.y), Math.abs(p.x - s.x), Math.abs(p.y -
        s.y)]), Qa(p, v), Qa(s, v), m.push([Math.min(p.x, s.x), Math.min(p.y, s.y), Math.abs(p.x - s.x), Math.abs(p.y - s.y)]));
        t.B(p);
        t.B(s);
        !a.Wb && a.vj && (zi(a) || zi(a));
        Ui(a, m, n, d, b);
        t.ya(m);
        t.ya(n);
        a.zd = !1
        }
}
} else
        a.Zd();
        t.hc(f)
        } else
        a.zg();
        for (a = a.im.k; a.next(); )
        Xi(a.value)
        }
}
function Ji(a) {
!1 === a.vj && (a.vj = !0)
        }
function yi(a) {
!1 === a.Hk && (a.Hk = !0)
        }
function fi(a, b, c) {
var d = a.jb, f = a.jg, g = b * f, f = c * f;
        if (d.width !== g || d.height !== f)
        d.width = g, d.height = f, d.style.width = b + "px", d.style.height = c + "px", a.ve = !0
        }
function zi(a) {
if (null !== a.jb && !a.Zb.sd) {
var b = a.Mb, c = a.Eb, d = a.Db, f = a.AD.copy(), g = !1, h = a.Sl ? a.mf : 0, k = a.Rl ? a.mf : 0, l = b.clientWidth || c + h, b = b.clientHeight || d + k;
        if (l !== c + h || b !== d + k)
        a.Sl = !1, a.Rl = !1, a.Eb = l, a.Db = b, fi(a, l, b), g = !0;
        a.vj = !1;
        if (a.Av)
        c === a.Eb && d === a.Db || a.zg();
        else {
        var m = a.xb, n = a.Ed, h = n.width, k = n.height, p = m.width, q = m.height, r = n.x, s = m.x, u = n.right, v = m.right, D = n.y, A = m.y, G = n.bottom, L = m.bottom, n = m = "1px", N = a.scale;
                l / N > h && b / N > k || (a.QE && a.nf && (p + 1 < h ? (m = (h - p) * N + a.Eb + "px", a.Lj.scrollLeft = (a.position.x - r) *
                        N) : r + 1 < s ? (m = (s - r) * N + a.Eb + "px", a.Lj.scrollLeft = a.Lj.scrollWidth - a.Lj.clientWidth) : u > v + 1 && (m = (u - v) * N + a.Eb + "px", a.Lj.scrollLeft = a.position.x * N)), a.RE && a.of && (q + 1 < k ? (n = (k - q) * N + a.Db + "px", a.Mj.scrollTop = (a.position.y - D) * N) : D + 1 < A ? (n = (A - D) * N + a.Db + "px", a.Mj.scrollTop = a.Mj.scrollHeight - a.Mj.clientHeight) : G > L + 1 && (n = (G - L) * N + a.Db + "px", a.Mj.scrollTop = a.position.y * N)));
                l = "1px" !== m;
                b = "1px" !== n;
                l !== a.Rl && (a.Db = "1px" === m ? a.Db + a.mf : Math.max(a.Db - a.mf, 1), g = !0);
                a.Rl = l;
                a.pz.style.width = m;
                b !== a.Sl && (a.Eb = "1px" === n ? a.Eb +
                        a.mf : Math.max(a.Eb - a.mf, 1), g = !0);
                a.Sl = b;
                a.qz.style.height = n;
                g && (fi(a, a.Eb, a.Db), vi(a));
                l = a.Eb;
                b = a.Db;
                a.Mj.style.height = b + "px";
                a.Mj.style.width = l + (a.Sl ? a.mf : 0) + "px";
                a.Lj.style.width = l + "px";
                a.Lj.style.height = b + (a.Rl ? a.mf : 0) + "px";
                a.oz = !1;
                return c !== l || d !== b ? (m = a.xb, a.Dt(f, m, g ? !0 : void 0), !1) : !0
                }
}
}
z.prototype.add = z.prototype.add = function(a) {
t.l(a, E, z, "add:part");
        var b = a.h;
        if (b !== this) {
null !== b && t.m("Cannot add part " + a.toString() + " to " + this.toString() + ". It is already a part of " + b.toString());
        this.un && (a.Jk = "Tool");
        var c = a.af, b = this.bt(c);
        null === b && (b = this.bt(""));
        null === b && t.m('Cannot add a Part when unable find a Layer named "' + c + '" and there is no default Layer');
        a.layer !== b && (c = b.mp(99999999, a, a.h === this), 0 <= c && this.Zc(wd, "parts", b, null, a, null, c), b.yc || this.Mc(), a.J($i), c = a.sp, null !==
                c && c(a, null, b))
        }
};
        z.prototype.mp = function(a) {
        if (a instanceof S) {
        if (this.ov.add(a), a instanceof T) {
        var b = a.gb;
                null === b ? this.Tk.add(a) : b.ro.add(a);
                b = a.jc;
                null !== b && (b.h = this)
                }
        } else
                a instanceof V ? this.Yu.add(a) : a instanceof Ke || this.Fb.add(a);
                a.Jb && a.fa();
                if (b = a.data) {
        a instanceof Ke || (a instanceof V ? this.zk.add(b, a) : this.ri.add(b, a));
                var c = this;
                aj(a, function(a) {
                bj(c, a)
                        })
                }
        !0 !== Qi(a) && !0 !== Ri(a) || this.cg.add(a);
                cj(a, !0, this);
                dj(a) ? (a.pa.N() && this.ka(Uh(a, a.pa)), this.Mc()) : a.Sa() && a.pa.N() && this.ka(Uh(a, a.pa));
                this.Zd()
                };
        z.prototype.Xe = function(a) {
        a.Mf();
                if (a instanceof S) {
        if (this.ov.remove(a), a instanceof T) {
        var b = a.gb;
                null === b ? this.Tk.remove(a) : b.ro.remove(a);
                b = a.jc;
                null !== b && (b.h = null)
                }
        } else
                a instanceof V ? this.Yu.remove(a) : a instanceof Ke || this.Fb.remove(a);
                if (b = a.data) {
        a instanceof Ke || (a instanceof V ? this.zk.remove(b) : this.ri.remove(b));
                var c = this;
                aj(a, function(a) {
                ej(c, a)
                        })
                }
        this.cg.remove(a);
                dj(a) ? (a.pa.N() && this.ka(Uh(a, a.pa)), this.Mc()) : a.Sa() && a.pa.N() && this.ka(Uh(a, a.pa));
                this.Zd()
                };
        z.prototype.remove = z.prototype.remove = function(a) {
        t.l(a, E, z, "remove:part");
                a.eb = !1;
                a.wg = !1;
                var b = a.layer;
                if (null !== b && b.h === this) {
        a.J(fj);
                a.Mm();
                var c = b.Xe( - 1, a, !1);
                0 <= c && this.Zc(xd, "parts", b, a, null, c, null);
                c = a.sp;
                null !== c && c(a, b, null)
                }
        };
        z.prototype.removeParts = z.prototype.WA = function(a, b) {
        if (a === this.selection) {
        var c = new C;
                c.Oe(a);
                a = c
                }
        for (c = a.k; c.next(); ) {
        var d = c.value;
                d.h === this && (b && !d.canDelete() || this.remove(d))
                }
        };
        z.prototype.copyParts = z.prototype.Im = function(a, b, c) {
        return this.Se.Im(a, b, c)
                };
        z.prototype.moveParts = z.prototype.moveParts = function(a, b, c) {
        t.l(b, w, z, "moveParts:offset");
                var d = this.wb;
                if (null !== d) {
        d = d.Fd;
                null === d && (d = new df, d.h = this);
                var f = new ja(E, Object);
                if (a)
                a = a.k;
                else {
                for (a = this.rl; a.next(); )
                        kf(d, f, a.value, c);
                        for (a = this.jh; a.next(); )
                        kf(d, f, a.value, c);
                        a = this.links
                        }
        for (; a.next(); )
                kf(d, f, a.value, c);
                d.moveParts(f, b, c)
                }
        };
        function gj(a, b, c) {
        t.l(b, ae, z, "addLayer:layer");
                null !== b.h && b.h !== a && t.m("Cannot share a Layer with another Diagram: " + b + " of " + b.h);
                null === c ? null !== b.h && t.m("Cannot add an existing Layer to this Diagram again: " + b) : (t.l(c, ae, z, "addLayer:existingLayer"), c.h !== a && t.m("Existing Layer must be in this Diagram: " + c + " not in " + c.h), b === c && t.m("Cannot move a Layer before or after itself: " + b));
                if (b.h !== a) {
        b = b.name;
                a = a.Xb;
                c = a.count;
                for (var d = 0; d < c; d++)
                a.wa(d).name === b && t.m("Cannot add Layer with the name '" +
                b + "'; a Layer with the same name is already present in this Diagram.")
        }
        }
z.prototype.addLayer = z.prototype.Js = function(a) {
gj(this, a, null);
        a.wd(this);
        var b = this.Xb, c = b.count - 1;
        if (!a.yc)
        for (; 0 <= c && b.wa(c).yc; )
        c--;
        b.Gd(c + 1, a);
        null !== this.ie && this.Zc(wd, "layers", this, null, a, null, c + 1);
        this.ka();
        this.Mc()
        };
        z.prototype.addLayerBefore = z.prototype.BH = function(a, b) {
        gj(this, a, b);
                a.wd(this);
                var c = this.Xb, d = c.indexOf(a);
                0 <= d && (c.remove(a), null !== this.ie && this.Zc(xd, "layers", this, a, null, d, null));
                for (var f = c.count, g = 0; g < f; g++)
                if (c.wa(g) === b) {
        c.Gd(g, a);
                break
                }
        null !== this.ie && this.Zc(wd, "layers", this, null, a, null, g);
                this.ka();
                0 > d && this.Mc()
                };
        z.prototype.addLayerAfter = function(a, b) {
        gj(this, a, b);
                a.wd(this);
                var c = this.Xb, d = c.indexOf(a);
                0 <= d && (c.remove(a), null !== this.ie && this.Zc(xd, "layers", this, a, null, d, null));
                for (var f = c.count, g = 0; g < f; g++)
                if (c.wa(g) === b) {
        c.Gd(g + 1, a);
                break
                }
        null !== this.ie && this.Zc(wd, "layers", this, null, a, null, g + 1);
                this.ka();
                0 > d && this.Mc()
                };
        z.prototype.removeLayer = function(a) {
        t.l(a, ae, z, "removeLayer:layer");
                a.h !== this && t.m("Cannot remove a Layer from another Diagram: " + a + " of " + a.h);
                if ("" !== a.name) {
        var b = this.Xb, c = b.indexOf(a);
                if (b.remove(a)) {
        for (b = a.Fb.copy().k; b.next(); ) {
        var d = b.value, f = d.af;
                d.af = f !== a.name ? f : ""
                }
        null !== this.ie && this.Zc(xd, "layers", this, a, null, c, null);
                this.ka();
                this.Mc()
                }
        }
        };
        z.prototype.findLayer = z.prototype.bt = function(a) {
        for (var b = this.Uw; b.next(); ) {
        var c = b.value;
                if (c.name === a)
                return c
                }
        return null
                };
        z.prototype.addChangedListener = z.prototype.Iz = function(a) {
        t.i(a, "function", z, "addChangedListener:listener");
                null === this.qj && (this.qj = new B("function"));
                this.qj.add(a)
                };
        z.prototype.removeChangedListener = z.prototype.UA = function(a) {
        t.i(a, "function", z, "removeChangedListener:listener");
                null !== this.qj && (this.qj.remove(a), 0 === this.qj.count && (this.qj = null))
                };
        z.prototype.dw = function(a) {
        this.Wa || this.ja.OE(a);
                a.td !== ud && (this.fh = !0);
                if (null !== this.qj) {
        var b = this.qj, c = b.length;
                if (1 === c)
                b = b.wa(0), b(a);
                else if (0 !== c)
                for (var d = b.Ie(), f = 0; f < c; f++)
                b = d[f], b(a)
                }
        };
        z.prototype.raiseChangedEvent = z.prototype.Zc = function(a, b, c, d, f, g, h) {
        void 0 === g && (g = null);
                void 0 === h && (h = null);
                var k = new td;
                k.h = this;
                k.td = a;
                k.propertyName = b;
                k.object = c;
                k.oldValue = d;
                k.Uf = g;
                k.newValue = f;
                k.Sf = h;
                this.dw(k)
                };
        z.prototype.raiseChanged = z.prototype.j = function(a, b, c, d, f) {
        this.Zc(vd, a, this, b, c, d, f)
                };
        t.A(z, {Zb: "animationManager"}, function() {
        return this.li
                });
        t.A(z, {ja: "undoManager"}, function() {
        return this.ie.ja
                });
        t.g(z, "skipsUndoManager", z.prototype.Wa);
        t.defineProperty(z, {Wa: "skipsUndoManager"}, function() {
        return this.Ki
                }, function(a) {
        t.i(a, "boolean", z, "skipsUndoManager");
                this.Ki = a;
                this.ie.Ki = a
                });
        t.g(z, "delaysLayout", z.prototype.sw);
        t.defineProperty(z, {sw: "delaysLayout"}, function() {
        return this.Dy
                }, function(a) {
        this.Dy = a
                });
        z.prototype.changeState = function(a, b) {
        if (null !== a && a.h === this) {
        var c = a.td;
                if (c === vd) {
        var c = a.object, d = a.propertyName, f = a.za(b);
                t.Ra(c, d, f);
                c instanceof Q && (c = c.S, null !== c && c.Mf());
                this.fh = !0
                } else if (c === wd) {
        f = a.object;
                d = a.Sf;
                c = a.newValue;
                if (f instanceof y) {
        if ("number" === typeof d && c instanceof Q) {
        var g = f;
                b ? g.Xe(d) : g.Gd(d, c);
                c = f.S;
                null !== c && c.Mf()
                }
        } else
                f instanceof ae ? (g = !0 === a.Uf, "number" === typeof d && c instanceof E && (b ? (c.Mf(), g ? f.Xe(d, c, g) : this.remove(c)) : f.mp(d, c, g))) : f instanceof z ? "number" ===
                typeof d && c instanceof ae && (b ? this.Xb.qd(d) : (c.wd(this), this.Xb.Gd(d, c))) : t.m("unknown ChangedEvent.Insert object: " + a.toString());
                this.fh = !0
                } else
                c === xd ? (f = a.object, d = a.Uf, c = a.oldValue, f instanceof y ? "number" === typeof d && c instanceof Q && (g = f, b ? g.Gd(d, c) : g.Xe(d)) : f instanceof ae ? (g = !0 === a.Sf, "number" === typeof d && c instanceof E && (b ? f.mp(d, c, g) : (c.Mf(), g ? f.Xe(d, c, g) : this.remove(c)))) : f instanceof z ? "number" === typeof d && c instanceof ae && (b ? (c.wd(this), this.Xb.Gd(d, c)) : this.Xb.qd(d)) : t.m("unknown ChangedEvent.Remove object: " +
                        a.toString()), this.fh = !0) : c !== ud && t.m("unknown ChangedEvent: " + a.toString())
                }
        };
        z.prototype.startTransaction = z.prototype.tc = function(a) {
        return this.ja.tc(a)
                };
        z.prototype.commitTransaction = z.prototype.Ce = function(a) {
        return this.ja.Ce(a)
                };
        z.prototype.rollbackTransaction = z.prototype.Mp = function() {
        return this.ja.Mp()
                };
        z.prototype.updateAllTargetBindings = function(a) {
        void 0 === a && (a = "");
                for (var b = this.rl; b.next(); )
                b.value.Qb(a);
                for (b = this.jh; b.next(); )
                b.value.Qb(a);
                for (b = this.links; b.next(); )
                b.value.Qb(a)
                };
        z.prototype.updateAllModelDataReferences = function() {
        for (var a = this.rl; a.next(); )
                a.value.updateModelDataReferences();
                for (a = this.jh; a.next(); )
                a.value.updateModelDataReferences();
                for (a = this.links; a.next(); )
                a.value.updateModelDataReferences()
                };
        z.prototype.Dt = function(a, b, c) {
        Ji(this);
                yi(this);
                var d = this.jc;
                null === d || !d.rt || c || a.width === b.width && a.height === b.height || d.J();
                this.Wb || Ci(this);
                Ki(this);
                d = this.Ua;
                !0 === this.bo && d instanceof Ie && (this.R.ea = this.HG(this.R.Ke), d.doMouseMove());
                Xi(this, a, b);
                this.Ba("ViewportBoundsChanged", c ? {} : null, a)
                };
        function Ki(a, b) {
        var c = a.fd;
                if (null !== c && c.visible) {
        for (var d = t.Al(), f = 1, g = 1, h = c.xa.length, k = 0; k < h; k++) {
        var l = c.xa.n[k], m = l.interval;
                2 > m || (hj(l.zb) ? g = g * m / H.GE(g, m) : f = f * m / H.GE(f, m))
        }
        h = c.gt;
                d.p(g * h.width, f * h.height);
                if (b)
                k = b.width, l = b.height, g = b.x, h = b.y;
                else {
                f = t.Df();
                        g = a.xb;
                        f.p(g.x, g.y, g.width, g.height);
                        for (h = a.im.k; h.next(); )
                        g = h.value.xb, g.N() && hb(f, g.x, g.y, g.width, g.height);
                        k = f.width;
                        l = f.height;
                        g = f.x;
                        h = f.y;
                        if (!f.N())
                        return
                }
        c.width = k + 2 * d.width;
                c.height = l + 2 * d.height;
                f = t.K();
                H.ct(g, h, 0, 0, d.width, d.height,
                        f);
                f.offset( - d.width, - d.height);
                t.bk(d);
                c.S.location = f;
                t.B(f)
        }
        }
z.prototype.clearSelection = z.prototype.fw = function() {
var a = 0 < this.selection.count;
        a && this.Ba("ChangingSelection");
        Xe(this);
        a && this.Ba("ChangedSelection")
        };
        function Xe(a) {
        a = a.selection;
                if (0 < a.count) {
        for (var b = a.Ie(), c = b.length, d = 0; d < c; d++)
                b[d].eb = !1;
                a.La();
                a.clear();
                a.freeze()
        }
        }
z.prototype.select = z.prototype.select = function(a) {
null !== a && a.layer.h === this && (t.l(a, E, z, "select:part"), !a.eb || 1 < this.selection.count) && (this.Ba("ChangingSelection"), Xe(this), a.eb = !0, this.Ba("ChangedSelection"))
        };
        z.prototype.selectCollection = z.prototype.dG = function(a) {
        this.Ba("ChangingSelection");
                Xe(this);
                if (t.isArray(a))
                for (var b = t.vb(a), c = 0; c < b; c++) {
        var d = t.mb(a, c);
                d instanceof E || t.m("Diagram.selectCollection given something that is not a Part: " + d);
                d.eb = !0
                }
        else
                for (a = a.k; a.next(); )
                d = a.value, d instanceof E || t.m("Diagram.selectCollection given something that is not a Part: " + d), d.eb = !0;
                this.Ba("ChangedSelection")
                };
        z.prototype.clearHighlighteds = z.prototype.TD = function() {
        var a = this.Hw;
                if (0 < a.count) {
        for (var b = a.Ie(), c = b.length, d = 0; d < c; d++)
                b[d].wg = !1;
                a.La();
                a.clear();
                a.freeze()
                }
        };
        z.prototype.highlight = function(a) {
        null !== a && a.layer.h === this && (t.l(a, E, z, "highlight:part"), !a.wg || 1 < this.Hw.count) && (this.TD(), a.wg = !0)
                };
        z.prototype.highlightCollection = function(a) {
        this.TD();
                if (t.isArray(a))
                for (var b = t.vb(a), c = 0; c < b; c++) {
        var d = t.mb(a, c);
                d instanceof E || t.m("Diagram.highlightCollection given something that is not a Part: " + d);
                d.wg = !0
                }
        else
                for (a = a.k; a.next(); )
                d = a.value, d instanceof E || t.m("Diagram.highlightCollection given something that is not a Part: " + d), d.wg = !0
                };
        z.prototype.scroll = function(a, b, c) {
        void 0 === c && (c = 1);
                var d = "up" === b || "down" === b, f;
                "pixel" === a ? f = c : "line" === a ? f = c * (d ? this.Qp : this.Pp) : "page" === a ? (a = d ? this.xb.height : this.xb.width, a *= this.scale, 0 !== a && (f = Math.max(a - (d ? this.Qp : this.Pp), 0), f *= c)) : t.m("scrolling unit must be 'pixel', 'line', or 'page', not: " + a);
                f /= this.scale;
                c = this.position.copy();
                "up" === b ? c.y = this.position.y - f : "down" === b ? c.y = this.position.y + f : "left" === b ? c.x = this.position.x - f : "right" === b ? c.x = this.position.x + f : t.m("scrolling direction must be 'up', 'down', 'left', or 'right', not: " +
                        b);
                this.position = c
                };
        z.prototype.scrollToRect = function(a) {
        var b = this.xb;
                b.Wj(a) || (a = a.Sz, a.x -= b.width / 2, a.y -= b.height / 2, this.position = a)
                };
        z.prototype.centerRect = function(a) {
        var b = this.xb;
                a = a.Sz;
                a.x -= b.width / 2;
                a.y -= b.height / 2;
                this.position = a
                };
        z.prototype.transformDocToView = z.prototype.FG = function(a) {
        var b = this.ld;
                b.reset();
                1 !== this.nc && b.scale(this.nc);
                var c = this.Ma;
                (0 !== c.x || 0 !== c.y) && isFinite(c.x) && isFinite(c.y) && b.translate( - c.x, - c.y);
                return a.copy().transform(this.ld)
                };
        function Si(a, b) {
        var c = a.ld, d = b[0], f = b[1], g = d + b[2], h = f + b[3], k = c.m11, l = c.m12, m = c.m21, n = c.m22, p = c.dx, q = c.dy, r = d * k + f * m + p, s = d * l + f * n + q, c = g * k + f * m + p, f = g * l + f * n + q, u = d * k + h * m + p, d = d * l + h * n + q, k = g * k + h * m + p, g = g * l + h * n + q, h = r, l = s, r = Math.min(r, c), h = Math.max(h, c), l = Math.min(l, f), s = Math.max(s, f), r = Math.min(r, u), h = Math.max(h, u), l = Math.min(l, d), s = Math.max(s, d), r = Math.min(r, k), h = Math.max(h, k), l = Math.min(l, g), s = Math.max(s, g);
                return[r, l, h - r, s - l]
        }
z.prototype.transformViewToDoc = z.prototype.HG = function(a) {
var b = this.ld;
        b.reset();
        1 !== this.nc && b.scale(this.nc);
        var c = this.Ma;
        (0 !== c.x || 0 !== c.y) && isFinite(c.x) && isFinite(c.y) && b.translate( - c.x, - c.y);
        return Qa(a.copy(), this.ld)
        };
        var Ye;
        z.None = Ye = t.w(z, "None", 0);
        var Gi;
        z.Uniform = Gi = t.w(z, "Uniform", 1);
        var Hi;
        z.UniformToFill = Hi = t.w(z, "UniformToFill", 2);
        var eg;
        z.CycleAll = eg = t.w(z, "CycleAll", 10);
        var og;
        z.CycleNotDirected = og = t.w(z, "CycleNotDirected", 11);
        var qg;
        z.CycleNotDirectedFast = qg = t.w(z, "CycleNotDirectedFast", 12);
        var rg;
        z.CycleNotUndirected = rg = t.w(z, "CycleNotUndirected", 13);
        var lg;
        z.CycleDestinationTree = lg = t.w(z, "CycleDestinationTree", 14);
        var ng;
        z.CycleSourceTree = ng = t.w(z, "CycleSourceTree", 15);
        t.g(z, "validCycle", z.prototype.NG);
        t.defineProperty(z, {NG: "validCycle"}, function() {
        return this.Sv
                }, function(a) {
        var b = this.Sv;
                b !== a && (t.Aa(a, z, z, "validCycle"), this.Sv = a, this.j("validCycle", b, a))
                });
        t.g(z, "linkSpacing", z.prototype.xp);
        t.defineProperty(z, {xp: "linkSpacing"}, function() {
        return this.yj
                }, function(a) {
        var b = this.yj;
                b !== a && (t.q(a, z, "linkSpacing"), 0 > a && t.la(a, ">= zero", z, "linkSpacing"), this.yj = a, this.j("linkSpacing", b, a))
                });
        t.A(z, {Uw: "layers"}, function() {
        return this.Xb.k
                });
        t.g(z, "isModelReadOnly", z.prototype.Ze);
        t.defineProperty(z, {Ze: "isModelReadOnly"}, function() {
        var a = this.ie;
                return null === a ? !1 : a.ab
                }, function(a) {
        var b = this.ie;
                null !== b && (b.ab = a)
                });
        t.g(z, "isReadOnly", z.prototype.ab);
        t.defineProperty(z, {ab: "isReadOnly"}, function() {
        return this.Ik
                }, function(a) {
        var b = this.Ik;
                b !== a && (t.i(a, "boolean", z, "isReadOnly"), this.Ik = a, this.j("isReadOnly", b, a))
                });
        t.g(z, "isEnabled", z.prototype.isEnabled);
        t.defineProperty(z, {isEnabled: "isEnabled"}, function() {
        return this.Le
                }, function(a) {
        var b = this.Le;
                b !== a && (t.i(a, "boolean", z, "isEnabled"), this.Le = a, this.j("isEnabled", b, a))
                });
        t.g(z, "allowClipboard", z.prototype.$v);
        t.defineProperty(z, {$v: "allowClipboard"}, function() {
        return this.bu
                }, function(a) {
        var b = this.bu;
                b !== a && (t.i(a, "boolean", z, "allowClipboard"), this.bu = a, this.j("allowClipboard", b, a))
                });
        t.g(z, "allowCopy", z.prototype.Ri);
        t.defineProperty(z, {Ri: "allowCopy"}, function() {
        return this.kk
                }, function(a) {
        var b = this.kk;
                b !== a && (t.i(a, "boolean", z, "allowCopy"), this.kk = a, this.j("allowCopy", b, a))
                });
        t.g(z, "allowDelete", z.prototype.Yk);
        t.defineProperty(z, {Yk: "allowDelete"}, function() {
        return this.lk
                }, function(a) {
        var b = this.lk;
                b !== a && (t.i(a, "boolean", z, "allowDelete"), this.lk = a, this.j("allowDelete", b, a))
                });
        t.g(z, "allowDragOut", z.prototype.Ms);
        t.defineProperty(z, {Ms: "allowDragOut"}, function() {
        return this.cu
                }, function(a) {
        var b = this.cu;
                b !== a && (t.i(a, "boolean", z, "allowDragOut"), this.cu = a, this.j("allowDragOut", b, a))
                });
        t.g(z, "allowDrop", z.prototype.Kz);
        t.defineProperty(z, {Kz: "allowDrop"}, function() {
        return this.du
                }, function(a) {
        var b = this.du;
                b !== a && (t.i(a, "boolean", z, "allowDrop"), this.du = a, this.j("allowDrop", b, a))
                });
        t.g(z, "allowTextEdit", z.prototype.Qo);
        t.defineProperty(z, {Qo: "allowTextEdit"}, function() {
        return this.uk
                }, function(a) {
        var b = this.uk;
                b !== a && (t.i(a, "boolean", z, "allowTextEdit"), this.uk = a, this.j("allowTextEdit", b, a))
                });
        t.g(z, "allowGroup", z.prototype.Mo);
        t.defineProperty(z, {Mo: "allowGroup"}, function() {
        return this.mk
                }, function(a) {
        var b = this.mk;
                b !== a && (t.i(a, "boolean", z, "allowGroup"), this.mk = a, this.j("allowGroup", b, a))
                });
        t.g(z, "allowUngroup", z.prototype.Ro);
        t.defineProperty(z, {Ro: "allowUngroup"}, function() {
        return this.vk
                }, function(a) {
        var b = this.vk;
                b !== a && (t.i(a, "boolean", z, "allowUngroup"), this.vk = a, this.j("allowUngroup", b, a))
                });
        t.g(z, "allowInsert", z.prototype.ym);
        t.defineProperty(z, {ym: "allowInsert"}, function() {
        return this.fu
                }, function(a) {
        var b = this.fu;
                b !== a && (t.i(a, "boolean", z, "allowInsert"), this.fu = a, this.j("allowInsert", b, a))
                });
        t.g(z, "allowLink", z.prototype.zm);
        t.defineProperty(z, {zm: "allowLink"}, function() {
        return this.nk
                }, function(a) {
        var b = this.nk;
                b !== a && (t.i(a, "boolean", z, "allowLink"), this.nk = a, this.j("allowLink", b, a))
                });
        t.g(z, "allowRelink", z.prototype.Tj);
        t.defineProperty(z, {Tj: "allowRelink"}, function() {
        return this.pk
                }, function(a) {
        var b = this.pk;
                b !== a && (t.i(a, "boolean", z, "allowRelink"), this.pk = a, this.j("allowRelink", b, a))
                });
        t.g(z, "allowMove", z.prototype.Sj);
        t.defineProperty(z, {Sj: "allowMove"}, function() {
        return this.ok
                }, function(a) {
        var b = this.ok;
                b !== a && (t.i(a, "boolean", z, "allowMove"), this.ok = a, this.j("allowMove", b, a))
                });
        t.g(z, "allowReshape", z.prototype.No);
        t.defineProperty(z, {No: "allowReshape"}, function() {
        return this.qk
                }, function(a) {
        var b = this.qk;
                b !== a && (t.i(a, "boolean", z, "allowReshape"), this.qk = a, this.j("allowReshape", b, a))
                });
        t.g(z, "allowResize", z.prototype.Oo);
        t.defineProperty(z, {Oo: "allowResize"}, function() {
        return this.rk
                }, function(a) {
        var b = this.rk;
                b !== a && (t.i(a, "boolean", z, "allowResize"), this.rk = a, this.j("allowResize", b, a))
                });
        t.g(z, "allowRotate", z.prototype.Po);
        t.defineProperty(z, {Po: "allowRotate"}, function() {
        return this.sk
                }, function(a) {
        var b = this.sk;
                b !== a && (t.i(a, "boolean", z, "allowRotate"), this.sk = a, this.j("allowRotate", b, a))
                });
        t.g(z, "allowSelect", z.prototype.Pe);
        t.defineProperty(z, {Pe: "allowSelect"}, function() {
        return this.tk
                }, function(a) {
        var b = this.tk;
                b !== a && (t.i(a, "boolean", z, "allowSelect"), this.tk = a, this.j("allowSelect", b, a))
                });
        t.g(z, "allowUndo", z.prototype.Lz);
        t.defineProperty(z, {Lz: "allowUndo"}, function() {
        return this.gu
                }, function(a) {
        var b = this.gu;
                b !== a && (t.i(a, "boolean", z, "allowUndo"), this.gu = a, this.j("allowUndo", b, a))
                });
        t.g(z, "allowZoom", z.prototype.Ns);
        t.defineProperty(z, {Ns: "allowZoom"}, function() {
        return this.iu
                }, function(a) {
        var b = this.iu;
                b !== a && (t.i(a, "boolean", z, "allowZoom"), this.iu = a, this.j("allowZoom", b, a))
                });
        t.g(z, "hasVerticalScrollbar", z.prototype.RE);
        t.defineProperty(z, {RE: "hasVerticalScrollbar"}, function() {
        return this.Mu
                }, function(a) {
        var b = this.Mu;
                b !== a && (t.i(a, "boolean", z, "hasVerticalScrollbar"), this.Mu = a, Ji(this), this.ka(), this.j("hasVerticalScrollbar", b, a), Ci(this))
                });
        t.g(z, "hasHorizontalScrollbar", z.prototype.QE);
        t.defineProperty(z, {QE: "hasHorizontalScrollbar"}, function() {
        return this.Lu
                }, function(a) {
        var b = this.Lu;
                b !== a && (t.i(a, "boolean", z, "hasHorizontalScrollbar"), this.Lu = a, Ji(this), this.ka(), this.j("hasHorizontalScrollbar", b, a), Ci(this))
                });
        t.g(z, "allowHorizontalScroll", z.prototype.nf);
        t.defineProperty(z, {nf: "allowHorizontalScroll"}, function() {
        return this.eu
                }, function(a) {
        var b = this.eu;
                b !== a && (t.i(a, "boolean", z, "allowHorizontalScroll"), this.eu = a, this.j("allowHorizontalScroll", b, a), Ci(this))
                });
        t.g(z, "allowVerticalScroll", z.prototype.of);
        t.defineProperty(z, {of: "allowVerticalScroll"}, function() {
        return this.hu
                }, function(a) {
        var b = this.hu;
                b !== a && (t.i(a, "boolean", z, "allowVerticalScroll"), this.hu = a, this.j("allowVerticalScroll", b, a), Ci(this))
                });
        t.g(z, "scrollHorizontalLineChange", z.prototype.Pp);
        t.defineProperty(z, {Pp: "scrollHorizontalLineChange"}, function() {
        return this.Bv
                }, function(a) {
        var b = this.Bv;
                b !== a && (t.i(a, "number", z, "scrollHorizontalLineChange"), 0 > a && t.la(a, ">= 0", z, "scrollHorizontalLineChange"), this.Bv = a, this.j("scrollHorizontalLineChange", b, a))
                });
        t.g(z, "scrollVerticalLineChange", z.prototype.Qp);
        t.defineProperty(z, {Qp: "scrollVerticalLineChange"}, function() {
        return this.Cv
                }, function(a) {
        var b = this.Cv;
                b !== a && (t.i(a, "number", z, "scrollVerticalLineChange"), 0 > a && t.la(a, ">= 0", z, "scrollVerticalLineChange"), this.Cv = a, this.j("scrollVerticalLineChange", b, a))
                });
        t.g(z, "lastInput", z.prototype.R);
        t.defineProperty(z, {R: "lastInput"}, function() {
        return this.ec
                }, function(a) {
        e && t.l(a, ld, z, "lastInput");
                this.ec = a
                });
        t.g(z, "firstInput", z.prototype.Lc);
        t.defineProperty(z, {Lc: "firstInput"}, function() {
        return this.Ck
                }, function(a) {
        e && t.l(a, ld, z, "firstInput");
                this.Ck = a
                });
        t.g(z, "currentCursor", z.prototype.$b);
        t.defineProperty(z, {$b: "currentCursor"}, function() {
        return this.wy
                }, function(a) {
        "" === a && (a = this.Fq);
                this.wy !== a && (t.i(a, "string", z, "currentCursor"), null !== this.jb && (this.wy = a, this.jb.style.cursor = a, this.Mb.style.cursor = a))
                });
        t.g(z, "defaultCursor", z.prototype.mI);
        t.defineProperty(z, {mI: "defaultCursor"}, function() {
        return this.Fq
                }, function(a) {
        "" === a && (a = "auto");
                var b = this.Fq;
                b !== a && (t.i(a, "string", z, "defaultCursor"), this.Fq = a, this.j("defaultCursor", b, a))
                });
        t.g(z, "hasGestureZoom", z.prototype.LI);
        t.defineProperty(z, {LI: "hasGestureZoom"}, function() {
        return this.vi
                }, function(a) {
        var b = this.vi;
                b !== a && (t.i(a, "boolean", z, "hasGestureZoom"), this.vi = a, this.j("hasGestureZoom", b, a))
                });
        t.g(z, "click", z.prototype.click);
        t.defineProperty(z, {click: "click"}, function() {
        return this.ni
                }, function(a) {
        var b = this.ni;
                b !== a && (null !== a && t.i(a, "function", z, "click"), this.ni = a, this.j("click", b, a))
                });
        t.g(z, "doubleClick", z.prototype.Nm);
        t.defineProperty(z, {Nm: "doubleClick"}, function() {
        return this.ti
                }, function(a) {
        var b = this.ti;
                b !== a && (null !== a && t.i(a, "function", z, "doubleClick"), this.ti = a, this.j("doubleClick", b, a))
                });
        t.g(z, "contextClick", z.prototype.Vs);
        t.defineProperty(z, {Vs: "contextClick"}, function() {
        return this.pi
                }, function(a) {
        var b = this.pi;
                b !== a && (null !== a && t.i(a, "function", z, "contextClick"), this.pi = a, this.j("contextClick", b, a))
                });
        t.g(z, "mouseOver", z.prototype.yt);
        t.defineProperty(z, {yt: "mouseOver"}, function() {
        return this.Di
                }, function(a) {
        var b = this.Di;
                b !== a && (null !== a && t.i(a, "function", z, "mouseOver"), this.Di = a, this.j("mouseOver", b, a))
                });
        t.g(z, "mouseHover", z.prototype.xt);
        t.defineProperty(z, {xt: "mouseHover"}, function() {
        return this.Ci
                }, function(a) {
        var b = this.Ci;
                b !== a && (null !== a && t.i(a, "function", z, "mouseHover"), this.Ci = a, this.j("mouseHover", b, a))
                });
        t.g(z, "mouseHold", z.prototype.wt);
        t.defineProperty(z, {wt: "mouseHold"}, function() {
        return this.Bi
                }, function(a) {
        var b = this.Bi;
                b !== a && (null !== a && t.i(a, "function", z, "mouseHold"), this.Bi = a, this.j("mouseHold", b, a))
                });
        t.g(z, "mouseDragOver", z.prototype.AF);
        t.defineProperty(z, {AF: "mouseDragOver"}, function() {
        return this.hv
                }, function(a) {
        var b = this.hv;
                b !== a && (null !== a && t.i(a, "function", z, "mouseDragOver"), this.hv = a, this.j("mouseDragOver", b, a))
                });
        t.g(z, "mouseDrop", z.prototype.vt);
        t.defineProperty(z, {vt: "mouseDrop"}, function() {
        return this.Ai
                }, function(a) {
        var b = this.Ai;
                b !== a && (null !== a && t.i(a, "function", z, "mouseDrop"), this.Ai = a, this.j("mouseDrop", b, a))
                });
        t.g(z, "toolTip", z.prototype.Vt);
        t.defineProperty(z, {Vt: "toolTip"}, function() {
        return this.Ni
                }, function(a) {
        var b = this.Ni;
                b !== a && (null !== a && t.l(a, Ke, z, "toolTip"), this.Ni = a, this.j("toolTip", b, a))
                });
        t.g(z, "contextMenu", z.prototype.contextMenu);
        t.defineProperty(z, {contextMenu: "contextMenu"}, function() {
        return this.qi
                }, function(a) {
        var b = this.qi;
                b !== a && (null !== a && t.l(a, Ke, z, "contextMenu"), this.qi = a, this.j("contextMenu", b, a))
                });
        t.g(z, "commandHandler", z.prototype.Se);
        t.defineProperty(z, {Se: "commandHandler"}, function() {
        return this.my
                }, function(a) {
        var b = this.my;
                b !== a && (t.l(a, oa, z, "commandHandler"), null !== a.h && t.m("Cannot share CommandHandlers between Diagrams: " + a.toString()), null !== b && b.wd(null), this.my = a, a.wd(this))
                });
        t.g(z, "toolManager", z.prototype.wb);
        t.defineProperty(z, {wb: "toolManager"}, function() {
        return this.Qv
                }, function(a) {
        var b = this.Qv;
                b !== a && (t.l(a, Ie, z, "toolManager"), null !== a.h && t.m("Cannot share ToolManagers between Diagrams: " + a.toString()), null !== b && b.wd(null), this.Qv = a, a.wd(this))
                });
        t.g(z, "defaultTool", z.prototype.qw);
        t.defineProperty(z, {qw: "defaultTool"}, function() {
        return this.Cy
                }, function(a) {
        var b = this.Cy;
                b !== a && (t.l(a, be, z, "defaultTool"), this.Cy = a, this.Ua === b && (this.Ua = a))
                });
        t.g(z, "currentTool", z.prototype.Ua);
        t.defineProperty(z, {Ua: "currentTool"}, function() {
        return this.yy
                }, function(a) {
        var b = this.yy;
                if (null !== b)
                for (b.ha && b.doDeactivate(), b.cancelWaitAfter(), b.doStop(), b = this.im.k; b.next(); )
                b.value.ka();
                null === a && (a = this.qw);
                null !== a && (t.l(a, be, z, "currentTool"), this.yy = a, a.wd(this), a.doStart())
                });
        t.A(z, {selection: "selection"}, function() {
        return this.Fv
                });
        t.g(z, "maxSelectionCount", z.prototype.tF);
        t.defineProperty(z, {tF: "maxSelectionCount"}, function() {
        return this.cv
                }, function(a) {
        var b = this.cv;
                if (b !== a)
                if (t.i(a, "number", z, "maxSelectionCount"), 0 <= a && !isNaN(a)) {
        if (this.cv = a, this.j("maxSelectionCount", b, a), !this.ja.sb && (a = this.selection.count - a, 0 < a)) {
        this.Ba("ChangingSelection");
                for (var b = this.selection.Ie(), c = 0; c < a; c++)
                b[c].eb = !1;
                this.Ba("ChangedSelection")
                }
        } else
                t.la(a, ">= 0", z, "maxSelectionCount")
                });
        t.g(z, "nodeSelectionAdornmentTemplate", z.prototype.FF);
        t.defineProperty(z, {FF: "nodeSelectionAdornmentTemplate"}, function() {
        return this.nv
                }, function(a) {
        var b = this.nv;
                b !== a && (t.l(a, Ke, z, "nodeSelectionAdornmentTemplate"), this.nv = a, this.j("nodeSelectionAdornmentTemplate", b, a))
                });
        t.g(z, "groupSelectionAdornmentTemplate", z.prototype.ME);
        t.defineProperty(z, {ME: "groupSelectionAdornmentTemplate"}, function() {
        return this.Iu
                }, function(a) {
        var b = this.Iu;
                b !== a && (t.l(a, Ke, z, "groupSelectionAdornmentTemplate"), this.Iu = a, this.j("groupSelectionAdornmentTemplate", b, a))
                });
        t.g(z, "linkSelectionAdornmentTemplate", z.prototype.qF);
        t.defineProperty(z, {qF: "linkSelectionAdornmentTemplate"}, function() {
        return this.Xu
                }, function(a) {
        var b = this.Xu;
                b !== a && (t.l(a, Ke, z, "linkSelectionAdornmentTemplate"), this.Xu = a, this.j("linkSelectionAdornmentTemplate", b, a))
                });
        t.A(z, {Hw: "highlighteds"}, function() {
        return this.Nu
                });
        t.g(z, "isModified", z.prototype.fh);
        t.defineProperty(z, {fh: "isModified"}, function() {
        var a = this.ja;
                return a.isEnabled ? null !== a.Xi ? !0 : this.Yy && this.Sg !== a.bj : this.Yy
                }, function(a) {
        if (this.Yy !== a) {
        t.i(a, "boolean", z, "isModified");
                this.Yy = a;
                var b = this.ja;
                !a && b.isEnabled && (this.Sg = b.bj);
                a || ij(this)
                }
        });
        function ij(a) {
        var b = a.fh;
                a.BD !== b && (a.BD = b, a.Ba("Modified"))
        }
t.g(z, "model", z.prototype.ba);
        t.defineProperty(z, {ba: "model"}, function() {
        return this.ie
                }, function(a) {
        var b = this.ie;
                if (b !== a) {
        t.l(a, F, z, "model");
                this.Ua.doCancel();
                null !== b && b.ja !== a.ja && b.ja.cF && t.m("Do not replace a Diagram.model while a transaction is in progress.");
                this.Zb.mn();
                this.fw();
                this.kf = !1;
                this.Rn = !0;
                this.Sg = - 2;
                this.Kf = !1;
                var c = this.zd;
                this.zd = !0;
                this.Zb.tl();
                null !== b && (b.UA(this.FC), b instanceof P && jj(this, b.gj), jj(this, b.Eg));
                this.ie = a;
                a.Iz(this.EC);
                kj(this, a.Eg);
                a instanceof P && lj(this, a.gj);
                a.UA(this.EC);
                a.Iz(this.FC);
                this.zd = c;
                this.Wb || this.ka();
                null !== b && (a.ja.isEnabled = b.ja.isEnabled)
                }
        });
        t.defineProperty(z, {Na: null}, function() {
        return this.xC
                }, function(a) {
        this.xC = a
                });
        function Yh(a, b) {
        if (b.ba === a.ba) {
        var c = b.td, d = b.propertyName;
                if (c === ud && "S" === d[0])
                if ("StartingFirstTransaction" === d) {
        c = a.wb;
                for (d = c.df.k; d.next(); )
                d.value.wd(a);
                for (d = c.Bg.k; d.next(); )
                d.value.wd(a);
                for (d = c.Cg.k; d.next(); )
                d.value.wd(a);
                a.zd || a.kf || (a.Au = !0, a.Rn && (a.Kf = !0), a.li.tl())
        } else if ("StartingUndo" === d || "StartingRedo" === d) {
        var f = a.Zb;
                f.vg && !a.Wa && f.mn();
                a.Ba("ChangingSelection")
        } else
                "StartedTransaction" === d && (f = a.Zb, f.vg && !a.Wa && f.mn(), a.Uu && f.tl());
                else if (a.Na) {
        a.Na = !1;
                try {
                var g = b.yf;
                        if ("" !==
                                g)
                        if (c === vd) {
                if ("linkFromKey" === g) {
                var h = b.object, k = a.Nf(h);
                        if (null !== k) {
                var l = b.newValue, m = a.Ve(l);
                        k.aa = m
                }
                } else if ("linkToKey" === g)
                        h = b.object, k = a.Nf(h), null !== k && (l = b.newValue, m = a.Ve(l), k.ca = m);
                        else if ("linkFromPortId" === g) {
                if (h = b.object, k = a.Nf(h), null !== k) {
                var n = b.newValue;
                        "string" === typeof n && (k.Of = n)
                }
                } else if ("linkToPortId" === g)
                        h = b.object, k = a.Nf(h), null !== k && (n = b.newValue, "string" === typeof n && (k.Mg = n));
                        else if ("nodeGroupKey" === g) {
                var h = b.object, p = a.eh(h);
                        if (null !== p) {
                var q = b.newValue;
                        if (void 0 !==
                                q) {
                var r = a.Ve(q);
                        p.gb = r instanceof T ? r : null
                } else
                        p.gb = null
                }
                } else if ("linkLabelKeys" === g) {
                if (h = b.object, k = a.Nf(h), null !== k) {
                var s = b.oldValue, u = b.newValue;
                        if (t.isArray(s))
                        for (var v = t.vb(s), D = 0; D < v; D++) {
                var A = t.mb(s, D), m = a.Ve(A);
                        null !== m && (m.Xd = null)
                }
                if (t.isArray(u))
                        for (v = t.vb(u), D = 0; D < v; D++)
                        A = t.mb(u, D), m = a.Ve(A), null !== m && (m.Xd = k)
                }
                } else if ("nodeParentKey" === g) {
                var G = b.object, L = a.Ve(b.newValue), N = a.Aw(G);
                        if (null !== N) {
                var O = N.et();
                        null !== O ? null === L ? a.remove(O) : a.pd ? O.aa = L : O.ca = L : mj(a, L, N)
                }
                } else if ("parentLinkCategory" ===
                        g) {
                var G = b.object, N = a.Aw(G), U = b.newValue;
                        null !== N && "string" === typeof U && (O = N.et(), null !== O && (O.Wc = U))
                } else if ("nodeCategory" === g) {
                var h = b.object, Y = a.eh(h), U = b.newValue;
                        null !== Y && "string" === typeof U && (Y.Wc = U)
                } else if ("linkCategory" === g) {
                var h = b.object, ba = a.Nf(h), U = b.newValue;
                        null !== ba && "string" === typeof U && (ba.Wc = U)
                } else if ("nodeDataArray" === g) {
                a.ka();
                        var R = b.oldValue;
                        jj(a, R);
                        var xa = b.newValue;
                        kj(a, xa)
                } else
                        "linkDataArray" === g && (a.ka(), R = b.oldValue, jj(a, R), xa = b.newValue, lj(a, xa));
                        a.fh = !0
                } else if (c ===
                        wd)
                        xa = b.newValue, "nodeDataArray" === g && t.rb(xa) ? nj(a, xa) : "linkDataArray" === g && t.rb(xa) ? oj(a, xa) : "linkLabelKeys" === g && qe(xa) && (k = a.Nf(b.object), m = a.Ve(xa), null !== k && null !== m && (m.Xd = k)), a.fh = !0;
                        else if (c === xd)
                        R = b.oldValue, "nodeDataArray" === g && t.rb(R) ? pj(a, R) : "linkDataArray" === g && t.rb(R) ? pj(a, R) : "linkLabelKeys" === g && qe(R) && (m = a.Ve(R), null !== m && (m.Xd = null)), a.fh = !0;
                        else {
                        if (c === ud && "SourceChanged" === g) {
                        var p = a.eh(b.object), Ya = b.propertyName;
                                null !== p && "string" === typeof Ya && (p.Qb(Ya), a.ba instanceof Ld &&
                                        (k = a.Nf(b.object), null !== k && k.Qb(Ya)))
                        }
                        }
                else if (c === vd) {
                var za = b.propertyName, h = b.object;
                        if (h === a.ba) {
                if ("nodeKeyProperty" === za || "nodeCategoryProperty" === za || "linkFromKeyProperty" === za || "linkToKeyProperty" === za || "linkFromPortIdProperty" === za || "linkToPortIdProperty" === za || "linkLabelKeysProperty" === za || "nodeIsGroupProperty" === za || "nodeGroupKeyProperty" === za || "nodeParentKeyProperty" === za || "linkCategoryProperty" === za)
                        a.ja.sb || a.gn()
                } else
                        Xh(a, h, za);
                        a.fh = !0
                } else if (c === wd || c === xd)
                        qj(a, b), a.fh = !0;
                        else if (c ===
                                ud) {
                if ("FinishedUndo" === d || "FinishedRedo" === d)
                        a.ja.xi = !0, a.Ba("ChangedSelection"), Ai(a), a.ja.xi = !1;
                        a.Au = !0;
                        a.zg();
                        f = a.li;
                        f.sd && 0 === a.ja.Je && Eh(f);
                        "CommittedTransaction" === d && a.ja.az && (a.Sg = Math.min(a.Sg, a.ja.bj - 1));
                        ij(a);
                        a.hz || "CommittedTransaction" !== d || (a.hz = !0, setTimeout(function() {
                        a.Ua.standardMouseOver();
                                a.hz = !1
                        }, 10))
                }
                } finally {
        a.Na = !0
        }
        }
        }
        }
function Xh(a, b, c) {
var d = a.eh(b);
        if (null !== d && "string" === typeof c)
        d.Qb(c), a.ba instanceof Ld && (b = a.Nf(b), null !== b && b.Qb(c));
        else if ("string" === typeof c) {
d = null;
        for (a = a.Xl.k; a.next(); ) {
for (var f = a.value, g = 0; g < f.length; g++) {
var h = f[g];
        null !== h.dg && (h = h.dg.za(b), null !== h && (null === d && (d = t.Cb()), d.push(h)))
        }
if (null !== d)
        break
        }
b = d;
        if (null !== b) {
for (d = 0; d < b.length; d++)
        b[d].Qb(c);
        t.ya(b)
        }
}
}
t.g(z, "skipsModelSourceBindings", z.prototype.Qt);
        t.defineProperty(z, {Qt: "skipsModelSourceBindings"}, function() {
        return this.cD
                }, function(a) {
        this.cD = a
                });
        function qj(a, b) {
        var c = b.td === wd, d = c ? b.Sf : b.Uf, f = c ? b.newValue : b.oldValue, g = a.Xl.za(b.object);
                if (Array.isArray(g) && "number" === typeof d)
                for (var h = 0; h < g.length; h++) {
        var k = g[h];
                k.type !== Tg && k.type !== di || d++;
                c ? rj(k, f, d) : (k.Xe(d), uj(k, d - 1))
        }
        }
function bj(a, b) {
var c = b.yi;
        if (t.isArray(c)) {
var d = a.Xl.za(c);
        if (null === d)
        a.Xl.add(c, [b]);
        else {
        for (c = 0; c < d.length; c++)
                if (d[c] === b)
                return;
                d.push(b)
                }
}
}
function ej(a, b) {
var c = b.yi;
        if (t.isArray(c)) {
var d = a.Xl.za(c);
        if (null !== d)
        for (var f = 0; f < d.length; f++)
        if (d[f] === b) {
d.splice(f, 1);
        0 === d.length && a.Xl.remove(c);
        break
        }
}
}
z.prototype.clear = z.prototype.clear = function() {
var a = null;
        null !== this.fd && (a = this.fd.S);
        this.ba.clear();
        for (var b = this.Xb.length, c = 0; c < b; c++)
        this.Xb.n[c].clear();
        this.cg.clear();
        this.Mn.clear();
        this.ov.clear();
        this.Tk.clear();
        this.Yu.clear();
        this.Fb.clear();
        this.ri.clear();
        this.zk.clear();
        this.Xl.clear();
        this.Fv.La();
        this.Fv.clear();
        this.Fv.freeze();
        this.Nu.La();
        this.Nu.clear();
        this.Nu.freeze();
        this.Bn = null;
        t.Ss = null;
        this.Bu = (new x(NaN, NaN, NaN, NaN)).freeze();
        null !== a && (this.add(a), this.Fb.remove(a));
        this.ka()
        };
        z.prototype.reset = z.prototype.reset = function() {
        this.Wb = !0;
                this.clear();
                this.Xb = new B(ae);
                this.Rk = {};
                this.OF();
                this.Ma = (new w(NaN, NaN)).freeze();
                this.nc = 1;
                this.Pu = (new w(NaN, NaN)).freeze();
                this.Qu = NaN;
                this.ev = 1E-4;
                this.bv = 100;
                this.Vv = (new w(NaN, NaN)).freeze();
                this.Gu = (new x(NaN, NaN, NaN, NaN)).freeze();
                this.Fl = Ye;
                this.An = xb;
                this.Gk = Ye;
                this.Yn = xb;
                this.Ru = this.Ou = Eb;
                this.lu = (new ab(16, 16, 16, 16)).freeze();
                this.Tu = !0;
                this.Sv = eg;
                this.Fq = "auto";
                this.qi = this.Ni = this.Ai = this.hv = this.Bi = this.Ci = this.Di = this.pi =
                this.ti = this.ni = null;
                this.Ik = !1;
                this.lk = this.kk = this.bu = this.Le = !0;
                this.du = this.cu = !1;
                this.hu = this.eu = this.Mu = this.Lu = this.iu = this.gu = this.tk = this.sk = this.rk = this.qk = this.ok = this.pk = this.nk = this.fu = this.vk = this.mk = this.uk = !0;
                this.Cv = this.Bv = 16;
                this.Ne = (new ab(5)).freeze();
                this.cv = 999999999;
                this.Nd = null;
                Zh(this);
                $h(this);
                this.fd = null;
                this.ba = new P;
                this.Ki = !0;
                this.jc = new ce;
                this.kf = this.Ki = !1;
                this.Rn = !0;
                this.Wb = this.Kf = !1;
                this.ka()
                };
        z.prototype.rebuildParts = z.prototype.gn = function() {
        for (var a = this.$w.k; a.next(); ) {
        var b = a.value;
                (!b.Jd() || b instanceof T) && t.m('Invalid node template in Diagram.nodeTemplateMap: template for "' + a.key + '" must be a Node or a simple Part, not a Group or Link: ' + b)
                }
        for (a = this.Fw.k; a.next(); )
                b = a.value, b instanceof T || t.m('Invalid group template in Diagram.groupTemplateMap: template for "' + a.key + '" must be a Group, not a normal Node or Link: ' + b);
                for (a = this.Ww.k; a.next(); )
                b = a.value, b instanceof V || t.m('Invalid link template in Diagram.linkTemplateMap: template for "' +
                        a.key + '" must be a Link, not a normal Node or simple Part: ' + b);
                a = t.Cb();
                for (b = this.selection.k; b.next(); ) {
        var c = b.value.data;
                c && a.push(c)
                }
        for (var b = t.Cb(), d = this.Hw.k; d.next(); )
                (c = d.value.data) && b.push(c);
                for (var c = t.Cb(), f = this.jh.k; f.next(); )
                d = f.value, d.data && (c.push(d.data), c.push(d.location));
                for (f = this.links.k; f.next(); )
                d = f.value, d.data && (c.push(d.data), c.push(d.location));
                for (f = this.rl.k; f.next(); )
                d = f.value, d.data && (c.push(d.data), c.push(d.location));
                d = this.ba;
                d instanceof P && jj(this, d.gj);
                jj(this, d.Eg);
                kj(this, d.Eg);
                d instanceof P && lj(this, d.gj);
                for (d = 0; d < a.length; d++)
                if (f = this.eh(a[d]))
                f.eb = !0;
                for (d = 0; d < b.length; d++)
                if (f = this.eh(b[d]))
                f.wg = !0;
                for (d = 0; d < c.length; d += 2)
                if (f = this.eh(c[d]))
                f.location = c[d + 1];
                t.ya(a);
                t.ya(b);
                t.ya(c)
                };
        function kj(a, b) {
        if (null !== b) {
        for (var c = a.ba, d = t.vb(b), f = 0; f < d; f++) {
        var g = t.mb(b, f);
                c.le(g) ? nj(a, g, !1) : c instanceof P && oj(a, g)
        }
        if (c instanceof P || c instanceof Ld) {
        for (f = 0; f < d; f++)
                g = t.mb(b, f), c.le(g) && Fj(a, g);
                if (c instanceof P)
                for (c = a.links; c.next(); )
                Gj(c.value)
        }
        Hj(a, !1)
        }
        }
function nj(a, b, c) {
if (void 0 !== b && null !== b && !a.ja.sb && !a.ri.contains(b)) {
void 0 === c && (c = !0);
        var d = a.getCategoryForNodeData(b), f = a.findTemplateForNodeData(b, d);
        f instanceof E && (Me(f), f = f.copy(), f instanceof E && (f.rh = d, a.un && (f.Jk = "Tool"), a.add(f), f.data = b, c && Fj(a, b)))
        }
}
z.prototype.getCategoryForNodeData = function(a) {
var b = this.ba, c = b.getCategoryForNodeData(a), d = !1;
        b instanceof P && (d = b.UI(a));
        d && "" === c && (c = "LinkLabel");
        return c
        };
        z.prototype.findTemplateForNodeData = function(a, b) {
        var c = !1, d = this.ba;
                d instanceof P && (c = d.sA(a));
                c ? (c = this.Fw.za(b), null === c && (c = this.Fw.za(""), null === c && (t.QG || (t.QG = !0, t.trace('No Group template found for category "' + b + '"'), t.trace("  Using default group template")), c = this.UB))) : (c = this.$w.za(b), null === c && (c = this.$w.za(""), null === c && (t.TG || (t.TG = !0, t.trace('No Node template found for category "' + b + '"'), t.trace("  Using default node template")), c = this.WB)));
                return c instanceof E ? c : null
                };
        function Fj(a, b) {
        var c = a.ba;
                if (c instanceof P || c instanceof Ld) {
        var d = c.Hb(b);
                if (void 0 !== d) {
        var f = re(c, d), g = a.eh(b);
                if (null !== f && null !== g) {
        for (f = f.k; f.next(); ) {
        var h = f.value;
                if (c instanceof P)
                if (c.le(h)) {
        if (g instanceof T && c.Rm(h) === d) {
        var k = a.eh(h);
                null !== k && (k.gb = g)
        }
        } else {
        if (k = a.Nf(h), null !== k && g instanceof S && (c.hl(h) === d && (k.aa = g), c.ll(h) === d && (k.ca = g), h = c.jl(h), t.isArray(h)))
                for (var l = 0; l < t.vb(h); l++)
                if (t.mb(h, l) === d) {
        g.Xd = k;
                break
        }
        }
        else
                c instanceof Ld && c.le(h) && g instanceof S && c.Sm(h) === d &&
                (k = a.Aw(h), mj(a, g, k))
        }
        ze(c, d)
        }
        c instanceof P ? (c = c.Rm(b), void 0 !== c && (c = a.Ve(c), c instanceof T && (g.gb = c))) : c instanceof Ld && (c = c.Sm(b), void 0 !== c && g instanceof S && (c = a.Ve(c), mj(a, c, g)))
        }
        }
        }
function mj(a, b, c) {
if (null !== b && null !== c) {
var d = a.wb.AA, f = b, g = c;
        if (a.pd)
        for (b = g.re; b.next(); ) {
var h = b.value;
        if (h.ca === g)
        return
        }
else
        for (f = c, g = b, b = f.re; b.next(); )
        if (h = b.value, h.aa === f)
        return;
        null !== d && mg(d, f, g, null, !0) || (d = a.getCategoryForLinkData(c.data), b = a.findTemplateForLinkData(c.data, d), b instanceof V && (Me(b), b = b.copy(), b instanceof V && (b.rh = d, b.aa = f, b.ca = g, a.add(b), b.data = c.data)))
        }
}
function lj(a, b) {
if (null !== b) {
for (var c = t.vb(b), d = 0; d < c; d++) {
var f = t.mb(b, d);
        oj(a, f)
        }
Hj(a, !1)
        }
}
function oj(a, b) {
if (void 0 !== b && null !== b && !a.ja.sb && !a.zk.contains(b)) {
var c = a.getCategoryForLinkData(b), d = a.findTemplateForLinkData(b, c);
        if (d instanceof V && (Me(d), d = d.copy(), d instanceof V)) {
d.rh = c;
        var c = a.ba, f = c.FI(b);
        "" !== f && (d.Of = f);
        f = c.hl(b);
        void 0 !== f && (f = a.Ve(f), f instanceof S && (d.aa = f));
        f = c.II(b);
        "" !== f && (d.Mg = f);
        f = c.ll(b);
        void 0 !== f && (f = a.Ve(f), f instanceof S && (d.ca = f));
        c = c.jl(b);
        if (t.isArray(c))
        for (var f = t.vb(c), g = 0; g < f; g++) {
var h = t.mb(c, g), h = a.Ve(h);
        null !== h && (h.Xd = d)
        }
a.add(d);
        d.data = b
        }
}
}
z.prototype.getCategoryForLinkData = function(a) {
var b = this.ba, c = "";
        b instanceof P ? c = b.getCategoryForLinkData(a) : b instanceof Ld && (c = b.HI(a));
        return c
        };
        z.prototype.findTemplateForLinkData = function(a, b) {
        var c = this.Ww.za(b);
                null === c && (c = this.Ww.za(""), null === c && (t.SG || (t.SG = !0, t.trace('No Link template found for category "' + b + '"'), t.trace("  Using default link template")), c = this.VB));
                return c instanceof V ? c : null
                };
        function jj(a, b) {
        for (var c = t.vb(b), d = 0; d < c; d++) {
        var f = t.mb(b, d);
                pj(a, f)
        }
        }
function pj(a, b) {
if (void 0 !== b && null !== b) {
var c = a.eh(b);
        if (c instanceof E) {
c.eb = !1;
        c.wg = !1;
        var d = c.layer;
        if (null !== d && d.h === a) {
var f = a.ba;
        if (f instanceof P && c instanceof S) {
var g = f.Hb(c.data);
        if (void 0 !== g) {
for (var h = c.re; h.next(); ) {
var k = h.value.data;
        se(f, g, k)
        }
c.bi && (h = c.Xd, null !== h && (k = h.data, se(f, g, k)));
        if (c instanceof T)
        for (h = c.Xc; h.next(); )
        k = h.value.data, f.le(k) && se(f, g, k)
        }
} else if (f instanceof Ld && c instanceof S) {
h = a.Nf(c.data);
        if (null !== h && (h.eb = !1, h.wg = !1, k = h.layer, null !== k)) {
var l = k.Xe( - 1,
        h, !1);
        0 <= l && a.Zc(xd, "parts", k, h, null, l, null);
        l = h.sp;
        null !== l && l(h, k, null)
        }
h = a.pd;
        for (k = c.re; k.next(); )
        l = k.value, l = (h ? l.ca : l.aa).data, f.le(l) && se(f, g, l)
        }
f = d.Xe( - 1, c, !1);
        0 <= f && a.Zc(xd, "parts", d, c, null, f, null);
        f = c.sp;
        null !== f && f(c, d, null)
        }
}
}
}
z.prototype.findPartForKey = z.prototype.DI = function(a) {
if (null === a || void 0 === a)
        return null;
        a = this.ba.tf(a);
        if (null === a)
        return null;
        a = this.ri.za(a);
        return a instanceof E ? a : null
        };
        z.prototype.findNodeForKey = z.prototype.Ve = function(a) {
        if (null === a || void 0 === a)
                return null;
                a = this.ba.tf(a);
                if (null === a)
                return null;
                a = this.ri.za(a);
                return a instanceof S ? a : null
                };
        z.prototype.findPartForData = z.prototype.eh = function(a) {
        if (null === a)
                return null;
                var b = this.ri.za(a);
                if (b instanceof E)
                return b;
                b = this.zk.za(a);
                return b instanceof E ? b : null
                };
        z.prototype.findNodeForData = z.prototype.Aw = function(a) {
        if (null === a)
                return null;
                a = this.ri.za(a);
                return a instanceof S ? a : null
                };
        z.prototype.findLinkForData = z.prototype.Nf = function(a) {
        if (null === a)
                return null;
                a = this.zk.za(a);
                return a instanceof V ? a : null
                };
        t.g(z, "nodeTemplate", z.prototype.pJ);
        t.defineProperty(z, {pJ: "nodeTemplate"}, function() {
        return this.Ei.za("")
                }, function(a) {
        var b = this.Ei.za("");
                b !== a && (t.l(a, E, z, "nodeTemplate"), this.Ei.add("", a), this.j("nodeTemplate", b, a), this.ja.sb || this.gn())
                });
        t.g(z, "nodeTemplateMap", z.prototype.$w);
        t.defineProperty(z, {$w: "nodeTemplateMap"}, function() {
        return this.Ei
                }, function(a) {
        var b = this.Ei;
                b !== a && (t.l(a, ja, z, "nodeTemplateMap"), this.Ei = a, this.j("nodeTemplateMap", b, a), this.ja.sb || this.gn())
                });
        t.g(z, "groupTemplate", z.prototype.KI);
        t.defineProperty(z, {KI: "groupTemplate"}, function() {
        return this.Dk.za("")
                }, function(a) {
        var b = this.Dk.za("");
                b !== a && (t.l(a, T, z, "groupTemplate"), this.Dk.add("", a), this.j("groupTemplate", b, a), this.ja.sb || this.gn())
                });
        t.g(z, "groupTemplateMap", z.prototype.Fw);
        t.defineProperty(z, {Fw: "groupTemplateMap"}, function() {
        return this.Dk
                }, function(a) {
        var b = this.Dk;
                b !== a && (t.l(a, ja, z, "groupTemplateMap"), this.Dk = a, this.j("groupTemplateMap", b, a), this.ja.sb || this.gn())
                });
        t.g(z, "linkTemplate", z.prototype.gJ);
        t.defineProperty(z, {gJ: "linkTemplate"}, function() {
        return this.zj.za("")
                }, function(a) {
        var b = this.zj.za("");
                b !== a && (t.l(a, V, z, "linkTemplate"), this.zj.add("", a), this.j("linkTemplate", b, a), this.ja.sb || this.gn())
                });
        t.g(z, "linkTemplateMap", z.prototype.Ww);
        t.defineProperty(z, {Ww: "linkTemplateMap"}, function() {
        return this.zj
                }, function(a) {
        var b = this.zj;
                b !== a && (t.l(a, ja, z, "linkTemplateMap"), this.zj = a, this.j("linkTemplateMap", b, a), this.ja.sb || this.gn())
                });
        t.g(z, "isMouseCaptured", z.prototype.Hd);
        t.defineProperty(z, {Hd: "isMouseCaptured"}, function() {
        return this.uC
                }, function(a) {
        var b = this.jb;
                null !== b && (a ? (this.R.bubbles = !1, b.removeEventListener("mousemove", this.Cp, !1), b.removeEventListener("mousedown", this.Bp, !1), b.removeEventListener("mouseup", this.Ep, !1), b.removeEventListener("mousewheel", this.hh, !1), b.removeEventListener("DOMMouseScroll", this.hh, !1), b.removeEventListener("mouseout", this.Dp, !1), window.addEventListener("mousemove", this.Cp, !0), window.addEventListener("mousedown", this.Bp, !0),
                        window.addEventListener("mouseup", this.Ep, !0), window.addEventListener("mousewheel", this.hh, !0), window.addEventListener("DOMMouseScroll", this.hh, !0), window.addEventListener("mouseout", this.Dp, !0), window.addEventListener("selectstart", this.preventDefault, !1)) : (window.removeEventListener("mousemove", this.Cp, !0), window.removeEventListener("mousedown", this.Bp, !0), window.removeEventListener("mouseup", this.Ep, !0), window.removeEventListener("mousewheel", this.hh, !0), window.removeEventListener("DOMMouseScroll",
                        this.hh, !0), window.removeEventListener("mouseout", this.Dp, !0), window.removeEventListener("selectstart", this.preventDefault, !1), b.addEventListener("mousemove", this.Cp, !1), b.addEventListener("mousedown", this.Bp, !1), b.addEventListener("mouseup", this.Ep, !1), b.addEventListener("mousewheel", this.hh, !1), b.addEventListener("DOMMouseScroll", this.hh, !1), b.addEventListener("mouseout", this.Dp, !1)), this.uC = a)
                });
        t.g(z, "position", z.prototype.position);
        t.defineProperty(z, {position: "position"}, function() {
        return this.Ma
                }, function(a) {
        var b = this.Ma;
                if (!b.M(a)) {
        t.l(a, w, z, "position");
                var c = this.xb.copy();
                c.x = b.x;
                c.y = b.y;
                a = a.copy();
                if (!this.Wb && null !== this.jb) {
        this.Wb = !0;
                var d = this.scale;
                Ei(this, a, this.Ed, this.Eb / d, this.Db / d, this.An);
                this.Wb = !1
                }
        this.Ma = a.Z();
                a = this.Zb;
                a.sd && Ph(a, b, this.Ma);
                this.Wb || this.Dt(c, this.xb)
                }
        });
        t.g(z, "initialPosition", z.prototype.VE);
        t.defineProperty(z, {VE: "initialPosition"}, function() {
        return this.Pu
                }, function(a) {
        this.Pu.M(a) || (t.l(a, w, z, "initialPosition"), this.Pu = a.Z())
                });
        t.g(z, "initialScale", z.prototype.WE);
        t.defineProperty(z, {WE: "initialScale"}, function() {
        return this.Qu
                }, function(a) {
        this.Qu !== a && (t.i(a, "number", z, "initialScale"), this.Qu = a)
                });
        t.g(z, "grid", z.prototype.kp);
        t.defineProperty(z, {kp: "grid"}, function() {
        null === this.fd && wi(this);
                return this.fd
                }, function(a) {
        var b = this.fd;
                if (b !== a) {
        null === b && (wi(this), b = this.fd);
                t.l(a, y, z, "grid");
                a.type !== xi && t.m("Diagram.grid must be a Panel of type Panel.Grid");
                var c = b.ia;
                null !== c && c.remove(b);
                this.fd = a;
                a.name = "GRID";
                null !== c && c.add(a);
                Ki(this);
                this.ka();
                this.j("grid", b, a)
                }
        });
        t.A(z, {xb: "viewportBounds"}, function() {
        var a = this.AD;
                if (null === this.jb)
                return a;
                var b = this.Ma, c = this.nc;
                a.p(b.x, b.y, Math.max(this.Eb, 0) / c, Math.max(this.Db, 0) / c);
                return a
                });
        t.g(z, "fixedBounds", z.prototype.eA);
        t.defineProperty(z, {eA: "fixedBounds"}, function() {
        return this.Gu
                }, function(a) {
        var b = this.Gu;
                b.M(a) || (t.l(a, x, z, "fixedBounds"), this.Gu = a = a.Z(), this.Mc(), this.j("fixedBounds", b, a))
                });
        t.A(z, {Ed: "documentBounds"}, function() {
        return this.Bu
                });
        function Fi(a, b) {
        a.wi = !1;
                var c = a.Bu;
                c.M(b) || (b = b.Z(), a.Bu = b, a.tj = null, Ci(a), a.Ba("DocumentBoundsChanged", null, c.copy()), Ji(a))
        }
t.g(z, "scale", z.prototype.scale);
        t.defineProperty(z, {scale: "scale"}, function() {
        return this.nc
                }, function(a) {
        var b = this.nc;
                t.q(a, z, "scale");
                a < this.Ag && (a = this.Ag);
                a > this.yg && (a = this.yg);
                if (b !== a) {
        this.nc = a;
                if (!this.Wb && !this.zd && (this.Wb = !0, null !== this.jb)) {
        var c = this.xb.copy(), d = this.Eb / a, f = this.Db / a;
                c.width = this.Eb / b;
                c.height = this.Db / b;
                var g = this.Xf.copy();
                if (isNaN(g.x))
                switch (this.kw) {
        case ac:
                g.x = 0;
                break;
                case bc:
                g.x = d - 1;
                break;
                case Kb:
                g.x = d / 2;
                break;
                case xb:
                case gc:
                g.x = d / 2
                }
        if (isNaN(g.y))
                switch (this.kw) {
        case $b:
                g.y = 0;
                break;
                case cc:
                g.y =
                f - 1;
                break;
                case Kb:
                g.y = f / 2;
                break;
                case xb:
                case gc:
                g.y = f / 2
                }
        this.position = new w(this.Ma.x + g.x / b - g.x / a, this.Ma.y + g.y / b - g.y / a);
                this.Wb = !1;
                this.Dt(c, this.xb)
                }
        this.ka();
                Ji(this)
                }
        });
        t.g(z, "autoScale", z.prototype.Cm);
        t.defineProperty(z, {Cm: "autoScale"}, function() {
        return this.Fl
                }, function(a) {
        var b = this.Fl;
                b !== a && (t.Aa(a, z, z, "autoScale"), this.Fl = a, this.j("autoScale", b, a), a !== Ye && Ci(this))
                });
        t.g(z, "initialAutoScale", z.prototype.QI);
        t.defineProperty(z, {QI: "initialAutoScale"}, function() {
        return this.Gk
                }, function(a) {
        var b = this.Gk;
                b !== a && (t.Aa(a, z, z, "initialAutoScale"), this.Gk = a, this.j("initialAutoScale", b, a))
                });
        t.g(z, "initialViewportSpot", z.prototype.XE);
        t.defineProperty(z, {XE: "initialViewportSpot"}, function() {
        return this.Ru
                }, function(a) {
        var b = this.Ru;
                b !== a && (t.l(a, I, z, "initialViewportSpot"), a.vd() || t.m("initialViewportSpot must be a real Spot: " + a), this.Ru = a, this.j("initialViewportSpot", b, a))
                });
        t.g(z, "initialDocumentSpot", z.prototype.UE);
        t.defineProperty(z, {UE: "initialDocumentSpot"}, function() {
        return this.Ou
                }, function(a) {
        var b = this.Ou;
                b !== a && (t.l(a, I, z, "initialDocumentSpot"), a.vd() || t.m("initialViewportSpot must be a real Spot: " + a), this.Ou = a, this.j("initialDocumentSpot", b, a))
                });
        t.g(z, "minScale", z.prototype.Ag);
        t.defineProperty(z, {Ag: "minScale"}, function() {
        return this.ev
                }, function(a) {
        t.q(a, z, "minScale");
                var b = this.ev;
                b !== a && (0 < a ? (this.ev = a, this.j("minScale", b, a), a > this.scale && (this.scale = a)) : t.la(a, "> 0", z, "minScale"))
                });
        t.g(z, "maxScale", z.prototype.yg);
        t.defineProperty(z, {yg: "maxScale"}, function() {
        return this.bv
                }, function(a) {
        t.q(a, z, "maxScale");
                var b = this.bv;
                b !== a && (0 < a ? (this.bv = a, this.j("maxScale", b, a), a < this.scale && (this.scale = a)) : t.la(a, "> 0", z, "maxScale"))
                });
        t.g(z, "zoomPoint", z.prototype.Xf);
        t.defineProperty(z, {Xf: "zoomPoint"}, function() {
        return this.Vv
                }, function(a) {
        this.Vv.M(a) || (t.l(a, w, z, "zoomPoint"), this.Vv = a = a.Z())
                });
        t.g(z, "contentAlignment", z.prototype.kw);
        t.defineProperty(z, {kw: "contentAlignment"}, function() {
        return this.An
                }, function(a) {
        var b = this.An;
                b.M(a) || (t.l(a, I, z, "contentAlignment"), this.An = a = a.Z(), this.j("contentAlignment", b, a), Ci(this))
                });
        t.g(z, "initialContentAlignment", z.prototype.RI);
        t.defineProperty(z, {RI: "initialContentAlignment"}, function() {
        return this.Yn
                }, function(a) {
        var b = this.Yn;
                b.M(a) || (t.l(a, I, z, "initialContentAlignment"), this.Yn = a = a.Z(), this.j("initialContentAlignment", b, a))
                });
        t.g(z, "padding", z.prototype.padding);
        t.defineProperty(z, {padding: "padding"}, function() {
        return this.Ne
                }, function(a) {
        "number" === typeof a ? a = new ab(a) : t.l(a, ab, z, "padding");
                var b = this.Ne;
                b.M(a) || (this.Ne = a = a.Z(), this.Mc(), this.j("padding", b, a))
                });
        t.A(z, {jh: "nodes"}, function() {
        return this.ov.k
                });
        t.A(z, {links: "links"}, function() {
        return this.Yu.k
                });
        t.A(z, {rl: "parts"}, function() {
        return this.Fb.k
                });
        z.prototype.findTopLevelGroups = function() {
        return this.Tk.k
                };
        t.g(z, "layout", z.prototype.jc);
        t.defineProperty(z, {jc: "layout"}, function() {
        return this.Nd
                }, function(a) {
        var b = this.Nd;
                b !== a && (t.l(a, ce, z, "layout"), null !== b && (b.h = null, b.group = null), this.Nd = a, a.h = this, a.group = null, this.ju = !0, this.j("layout", b, a), this.Zd())
                });
        z.prototype.layoutDiagram = function(a) {
        Ai(this);
                a && Hj(this, !0);
                Mi(this, !1)
                };
        function Hj(a, b) {
        for (var c = a.Tk.k; c.next(); )
                Ij(a, c.value, b);
                null !== a.jc && (b ? a.jc.$e = !1 : a.jc.J())
        }
function Ij(a, b, c) {
if (null !== b) {
for (var d = b.ro.k; d.next(); )
        Ij(a, d.value, c);
        null !== b.jc && (c ? b.jc.$e = !1 : b.jc.J())
        }
}
function Mi(a, b) {
if (!a.Dy) {
var c = a.jc, d = a.Uu;
        a.Uu = !0;
        var f = a.Na;
        a.Na = !0;
        try {
        for (var g = a.Tk.k; g.next(); )
                Jj(a, g.value, b);
                c.$e || b && !c.xA || (c.doLayout(a), Ai(a), c.$e = !0)
                } finally {
a.ju = !c.$e, a.Uu = d, a.Na = f
        }
}
}
function Jj(a, b, c) {
if (null !== b) {
for (var d = b.ro.k; d.next(); )
        Jj(a, d.value, c);
        d = b.jc;
        null === d || d.$e || c && !d.xA || (b.LC = !b.location.N(), d.doLayout(b), b.J(Kj), d.$e = !0, Oi(a, b))
        }
}
t.g(z, "isTreePathToChildren", z.prototype.pd);
        t.defineProperty(z, {pd: "isTreePathToChildren"}, function() {
        return this.Tu
                }, function(a) {
        var b = this.Tu;
                if (b !== a && (t.i(a, "boolean", z, "isTreePathToChildren"), this.Tu = a, this.j("isTreePathToChildren", b, a), !this.ja.sb))
                for (a = this.jh; a.next(); )
                Lj(a.value)
                });
        z.prototype.findTreeRoots = function() {
        for (var a = new B(S), b = this.jh.k; b.next(); ) {
        var c = b.value;
                c.rp && null === c.et() && a.add(c)
                }
        return a.k
                };
        t.g(z, "isCollapsingExpanding", z.prototype.Ud);
        t.defineProperty(z, {Ud: null}, function() {
        return this.mC
                }, function(a) {
        this.mC = a
                });
        function Wh(a) {
        function b(a) {
        var b = a.toLowerCase(), h = new B("function");
                c.add(a, h);
                c.add(b, h);
                d.add(a, a);
                d.add(b, a)
        }
        var c = new ja("string", B), d = new ja("string", "string");
                b("AnimationStarting");
                b("AnimationFinished");
                b("BackgroundSingleClicked");
                b("BackgroundDoubleClicked");
                b("BackgroundContextClicked");
                b("ClipboardChanged");
                b("ClipboardPasted");
                b("DocumentBoundsChanged");
                b("ExternalObjectsDropped");
                b("InitialLayoutCompleted");
                b("LayoutCompleted");
                b("LinkDrawn");
                b("LinkRelinked");
                b("LinkReshaped");
                b("Modified");
                b("ObjectSingleClicked");
                b("ObjectDoubleClicked");
                b("ObjectContextClicked");
                b("PartCreated");
                b("PartResized");
                b("PartRotated");
                b("SelectionMoved");
                b("SelectionCopied");
                b("SelectionDeleting");
                b("SelectionDeleted");
                b("SelectionGrouped");
                b("SelectionUngrouped");
                b("ChangingSelection");
                b("ChangedSelection");
                b("SubGraphCollapsed");
                b("SubGraphExpanded");
                b("TextEdited");
                b("TreeCollapsed");
                b("TreeExpanded");
                b("ViewportBoundsChanged");
                a.Fy = c;
                a.Ey = d
        }
function ma(a, b) {
var c = a.Ey.za(b);
        return null !== c ? c : a.Ey.za(b.toLowerCase())
        }
function Mj(a, b) {
var c = a.Fy.za(b);
        if (null !== c)
        return c;
        c = a.Fy.za(b.toLowerCase());
        if (null !== c)
        return c;
        t.m("Unknown DiagramEvent name: " + b);
        return null
        }
z.prototype.addDiagramListener = z.prototype.Jz = function(a, b) {
t.i(a, "string", z, "addDiagramListener:name");
        t.i(b, "function", z, "addDiagramListener:listener");
        var c = Mj(this, a);
        null !== c && c.add(b)
        };
        z.prototype.removeDiagramListener = z.prototype.MF = function(a, b) {
        t.i(a, "string", z, "removeDiagramListener:name");
                t.i(b, "function", z, "addDiagramListener:listener");
                var c = Mj(this, a);
                null !== c && c.remove(b)
                };
        z.prototype.raiseDiagramEvent = z.prototype.Ba = function(a, b, c) {
        e && t.i(a, "string", z, "raiseDiagramEvent:name");
                var d = Mj(this, a), f = new rd;
                f.h = this;
                f.name = ma(this, a);
                void 0 !== b && (f.xx = b);
                void 0 !== c && (f.gx = c);
                a = d.length;
                if (1 === a)
                d = d.wa(0), d(f);
                else if (0 !== a)
                for (b = d.Ie(), c = 0; c < a; c++)
                d = b[c], d(f);
                return f.cancel
                };
        function Zf(a, b) {
        var c = !1;
                a.xb.Wj(b) && (c = !0);
                c = a.cA(b, function(a) {
                return a.S
                }, function(a) {
                return a instanceof V
                }, !0, function(a) {
                return a instanceof V
                }, c);
                if (0 !== c.count)
                for (c = c.k; c.next(); ) {
        var d = c.value;
                d.cj && d.ac()
        }
        }
function Nj(a, b) {
null === a.Qd && (a.Qd = new Oj);
        var c = null !== b ? b.gb : null;
        if (a.Qd.mt || a.Qd.group !== c) {
if (null === c) {
var d;
        d = a.wi ? Bi(a) : a.Ed.copy();
        d.Pf(100, 100);
        a.Qd.initialize(d);
        d = t.Df();
        for (var f = a.jh; f.next(); ) {
var g = f.value, h = g.layer;
        null !== h && h.visible && !h.yc && Pj(a, g, null, d)
        }
} else
        for (c.pa.N() || c.rf(), d = c.pa.copy(), d.Pf(20, 20), a.Qd.initialize(d), d = t.Df(), f = c.Xc; f.next(); )
        g = f.value, g instanceof S && Pj(a, g, null, d);
        t.hc(d);
        a.Qd.group = c;
        a.Qd.mt = !1
        } else
        Qj(a.Qd);
        return a.Qd
        }
function Pj(a, b, c, d) {
if (b !== c)
        if (b.Sa() && b.canAvoid()) {
c = b.getAvoidableRect(d);
        d = a.Qd.Em;
        b = a.Qd.Dm;
        for (var f = c.x + c.width, g = c.y + c.height, h = c.x; h < f; h += d) {
for (var k = c.y; k < g; k += b)
        Rj(a.Qd, h, k);
        Rj(a.Qd, h, g)
        }
for (k = c.y; k < g; k += b)
        Rj(a.Qd, f, k);
        Rj(a.Qd, f, g)
        } else if (b instanceof T)
        for (b = b.Xc; b.next(); )
        f = b.value, f instanceof S && Pj(a, f, c, d)
        }
function Sj(a, b) {
null === a.Qd || a.Qd.mt || null !== b && !b.canAvoid() || (a.Qd.mt = !0)
        }
z.prototype.simulatedMouseMove = z.prototype.eB = function(a, b, c) {
if (null !== gf) {
var d = gf.h;
        c instanceof z || (c = null);
        var f = hf;
        c !== f && (null !== f && f !== d && null !== f.wb.Fd && (uf(f), gf.ot = !1, f.wb.Fd.doSimulatedDragLeave()), hf = c, null !== c && c !== d && null !== c.wb.Fd && (Af(), f = c.wb.Fd, xf.contains(f) || xf.add(f), c.wb.Fd.doSimulatedDragEnter()));
        if (null === c || c === d || !c.Kz || c.ab || !c.ym)
        return!1;
        d = c.wb.Fd;
        null !== d && (null !== a ? b = c.Vn(a) : null === b && (b = new w), c.ec.ea = b, c.ec.$j = !1, c.ec.lj = !1, d.doSimulatedDragOver());
        return!0
        }
return!1
        };
        z.prototype.simulatedMouseUp = z.prototype.oG = function(a, b, c, d) {
        if (null !== gf) {
        null === d && (d = b);
                b = hf;
                var f = gf.h;
                if (d !== b) {
        if (null !== b && b !== f && null !== b.wb.Fd)
                return uf(b), gf.ot = !1, b.wb.Fd.doSimulatedDragLeave(), !1;
                hf = d;
                null !== d && null !== d.wb.Fd && (Af(), b = d.wb.Fd, xf.contains(b) || xf.add(b), d.wb.Fd.doSimulatedDragEnter())
                }
        if (null === d)
                return gf.doCancel(), !0;
                if (d !== this)
                return null !== a && (c = d.Vn(a)), d.ec.ea = c, d.ec.$j = !1, d.ec.lj = !0, a = d.wb.Fd, null !== a && a.doSimulatedDrop(), a = gf, null !== a && (d = a.mayCopy(), a.ff = d ? "Copy" :
                "Move", a.stopTool()), !0
                }
        return!1
                };
        t.g(z, "autoScrollRegion", z.prototype.OD);
        t.defineProperty(z, {OD: "autoScrollRegion"}, function() {
        return this.lu
                }, function(a) {
        "number" === typeof a ? a = new ab(a) : t.l(a, ab, z, "autoScrollRegion");
                var b = this.lu;
                b.M(a) || (this.lu = a = a.Z(), this.Mc(), this.j("autoScrollRegion", b, a))
                });
        function Vf(a, b) {
        a.ku.assign(b);
                Tj(a, a.ku).sf(a.position) ? uf(a) : Uj(a)
        }
function Uj(a) {
null === a.Gl && (a.Gl = {}, a.Gl.id = setInterval(function() {
if (null !== a.Gl) {
uf(a);
        var b = Tj(a, a.ku);
        b.sf(a.position) || (a.position = b, a.R.ea = a.HG(a.ku), a.eB(a.R.event, null, a.R.event.target.U) || a.doMouseMove(), a.wi = !0, Fi(a, a.pf()), a.ve = !0, a.zg(), Uj(a))
        }
}, a.fH))
        }
function uf(a) {
null !== a.Gl && (clearInterval(a.Gl.id), a.Gl = null)
        }
function Tj(a, b) {
var c = a.position, d = a.OD;
        if (0 >= d.top && 0 >= d.left && 0 >= d.right && 0 >= d.bottom)
        return c;
        var f = a.xb, g = a.scale, f = t.hk(0, 0, f.width * g, f.height * g), h = t.lc(0, 0);
        if (b.x >= f.x && b.x < f.x + d.left) {
var k = Math.max(a.Pp, 1), k = k | 0;
        h.x -= k;
        b.x < f.x + d.left / 2 && (h.x -= k);
        b.x < f.x + d.left / 4 && (h.x -= 4 * k)
        } else
        b.x <= f.x + f.width && b.x > f.x + f.width - d.right && (k = Math.max(a.Pp, 1), k |= 0, h.x += k, b.x > f.x + f.width - d.right / 2 && (h.x += k), b.x > f.x + f.width - d.right / 4 && (h.x += 4 * k));
        b.y >= f.y && b.y < f.y + d.top ? (k = Math.max(a.Qp, 1), k |= 0, h.y -= k, b.y < f.y +
                d.top / 2 && (h.y -= k), b.y < f.y + d.top / 4 && (h.y -= 4 * k)) : b.y <= f.y + f.height && b.y > f.y + f.height - d.bottom && (k = Math.max(a.Qp, 1), k |= 0, h.y += k, b.y > f.y + f.height - d.bottom / 2 && (h.y += k), b.y > f.y + f.height - d.bottom / 4 && (h.y += 4 * k));
        h.sf(H.mj) || (c = new w(c.x + h.x / g, c.y + h.y / g));
        t.hc(f);
        t.B(h);
        return c
        }
z.prototype.makeSVG = z.prototype.makeSvg = function(a) {
void 0 === a && (a = {});
        a.context = "svg";
        a = Vj(this, a);
        return null !== a ? a.zl : null
        };
        z.prototype.makeImage = function(a) {
        void 0 === a && (a = {});
                var b = (a.document || document).createElement("img");
                b.src = this.hJ(a);
                return b instanceof HTMLImageElement ? b : null
                };
        z.prototype.makeImageData = z.prototype.hJ = function(a) {
        void 0 === a && (a = {});
                var b = Vj(this, a);
                return null !== b ? b.toDataURL(a.type, a.details) : ""
                };
        function Vj(a, b) {
        a.Zb.mn();
                a.zg();
                if (null === a.jb)
                return null;
                "object" !== typeof b && t.m("properties argument must be an Object.");
                var c = !1, d = b.size || null, f = b.scale || null;
                void 0 !== b.scale && isNaN(b.scale) && (f = "NaN");
                var g = b.maxSize;
                void 0 === b.maxSize && (c = !0, g = "svg" === b.context ? new ga(Infinity, Infinity) : new ga(2E3, 2E3));
                var h = b.position || null, k = b.parts || null, l = void 0 === b.padding ? 1 : b.padding, m = b.background || null, n = b.omitTemporary;
                void 0 === n && (n = !0);
                var p = b.document || document, q = b.elementFinished || null, r =
                b.showTemporary;
                void 0 === r && (r = !n);
                n = b.showGrid;
                void 0 === n && (n = r);
                null !== d && isNaN(d.width) && isNaN(d.height) && (d = null);
                l && "number" === typeof l && (l = new ab(l));
                l || (l = new ab(0));
                l.left = Math.max(l.left, 0);
                l.right = Math.max(l.right, 0);
                l.top = Math.max(l.top, 0);
                l.bottom = Math.max(l.bottom, 0);
                a.Nn = !1;
                vi(a);
                var s = p.createElement("canvas"), u = s.getContext("2d"), v = s;
                if (!(d || f || k || h))
                return s.width = a.Eb + Math.ceil(l.left + l.right), s.height = a.Db + Math.ceil(l.top + l.bottom), "svg" === b.context && (u = v = new nc(s, p, q), u instanceof
                nc && (a.Nn = !0)), Vi(a, u, l, new ga(s.width, s.height), a.nc, a.Ma, k, m, r, n), a.Nn = !0, v;
                var D = a.Se.Xs, A, G = new w(0, 0);
                A = a.Ed.copy();
                A.VJ(a.padding);
                null !== h && h.N() ? (G = h, f || (f = D)) : (G.x = A.x, G.y = A.y);
                if (k) {
        var L, h = !0, k = k.k;
                for (k.reset(); k.next(); ) {
        var N = k.value;
                if (N instanceof E) {
        var O = N.layer;
                O && !O.visible || O && O.yc || !N.Sa() || (N = N.pa, N.N() && (h ? (h = !1, L = N.copy()) : L.kj(N)))
        }
        }
        h && (L = new x(0, 0, 0, 0));
                A.width = L.width;
                A.height = L.height;
                G.x = L.x;
                G.y = L.y
        }
        h = L = 0;
                l && (L = l.left + l.right, h = l.top + l.bottom);
                N = O = 0;
                d && (O = d.width, N = d.height,
                        isFinite(O) && (O = Math.max(0, O - L)), isFinite(N) && (N = Math.max(0, N - h)));
                d && f ? ("NaN" === f && (f = D), d.N() ? (d = O, A = N) : isNaN(N) ? (d = O, A = A.height * f) : (d = A.width * f, A = N)) : d ? d.N() ? (f = Math.min(O / A.width, N / A.height), d = O, A = N) : isNaN(N) ? (f = O / A.width, d = O, A = A.height * f) : (f = N / A.height, d = A.width * f, A = N) : f ? "NaN" === f && g.N() ? (f = Math.min((g.width - L) / A.width, (g.height - h) / A.height), f > D ? (f = D, d = A.width, A = A.height) : (d = g.width, A = g.height)) : (d = A.width * f, A = A.height * f) : (f = D, d = A.width, A = A.height);
                l ? (d += L, A += h) : l = new ab(0);
                g && (D = g.width, g = g.height,
                        "svg" !== b.context && c && !t.PG && (d > D || A > g) && (t.trace("Diagram.makeImage(data): Diagram width or height is larger than the default max size. (" + Math.ceil(d) + "x" + Math.ceil(A) + " vs 2000x2000) Consider increasing the max size."), t.PG = !0), isNaN(D) && (D = 2E3), isNaN(g) && (g = 2E3), isFinite(D) && (d = Math.min(d, D)), isFinite(g) && (A = Math.min(A, g)));
                s.width = Math.ceil(d);
                s.height = Math.ceil(A);
                "svg" === b.context && (u = v = new nc(s, p, q), u instanceof nc && (a.Nn = !0));
                Vi(a, u, l, new ga(Math.ceil(d), Math.ceil(A)), f, G, k, m, r, n);
                a.Nn = !0;
                return v
        }
z.inherit = function(a, b) {
t.i(a, "function", z, "inherit");
        t.i(b, "function", z, "inherit");
        b.rH && t.m("Cannot inherit from " + t.ug(b));
        t.Ka(a, b)
        };
        function Wj(a) {
        1 < arguments.length && t.m("Palette constructor can only take one optional argument, the DIV HTML element or its id.");
                z.call(this, a);
                this.Ms = !0;
                this.Sj = !1;
                this.ab = !0;
                this.kw = Fb;
                this.jc = new Xj
        }
t.ga("Palette", Wj);
        t.Ka(Wj, z);
        function Yi(a) {
        1 < arguments.length && t.m("Overview constructor can only take one optional argument, the DIV HTML element or its id.");
                z.call(this, a);
                this.li.isEnabled = !1;
                this.Wb = !0;
                this.Fi = null;
                this.lH = this.Du = !0;
                this.MJ("drawShadows", !1);
                var b = new E, c = new W;
                c.stroke = "magenta";
                c.fb = 2;
                c.fill = "transparent";
                c.name = "BOXSHAPE";
                b.nx = "BOXSHAPE";
                b.Xw = "BOXSHAPE";
                b.cursor = "move";
                b.add(c);
                this.Il = b;
                this.xz = document.createElement("canvas");
                this.tH = this.xz.getContext("2d");
                b = new Yj;
                b.wd(this);
                this.wb.df.Gd(0, b);
                var d = this;
                this.HF = function() {
                Zj(d)
                };
                this.GF = function() {
                null !== d.Fi && (d.Mc(), d.ka())
                };
                this.ab = !0;
                this.Pe = !1;
                this.Cm = Gi;
                this.wb.bn = bf;
                this.Wb = !1
        }
t.ga("Overview", Yi);
        t.Ka(Yi, z);
        function Zi(a) {
        a.Wb || a.zd || !1 !== a.Kf || (a.Kf = !0, requestAnimationFrame(function() {
        if (a.Kf && !a.zd && (a.Kf = !1, null !== a.Mb)) {
        a.zd = !0;
                Ai(a);
                a.Ed.N() || Fi(a, a.pf());
                null === a.Mb && t.m("No div specified");
                null === a.jb && t.m("No canvas specified");
                if (a.ve) {
        var b = a.Fi;
                if (null !== b && !b.Zb.vg && !b.Zb.sd) {
        var b = a.Qg, c = a.xz;
                b.setTransform(1, 0, 0, 1, 0, 0);
                b.clearRect(0, 0, a.jb.width, a.jb.height);
                b.drawImage(c, 0, 0);
                c = a.ld;
                c.reset();
                1 !== a.nc && c.scale(a.scale);
                0 === a.position.x && 0 === a.position.y || c.translate( - a.Ma.x, - a.Ma.y);
                b.setTransform(c.m11,
                        c.m12, c.m21, c.m22, c.dx, c.dy);
                for (var c = a.Xb.length, d = 0; d < c; d++)
                a.Xb.n[d].Ue(b, a);
                a.Hk = !1;
                a.ve = !1
        }
        }
        a.zd = !1
        }
        }))
        }
Yi.prototype.computePixelRatio = function() {
return 1
        };
        Yi.prototype.Ue = function() {
        null === this.Mb && t.m("No div specified");
                null === this.jb && t.m("No canvas specified");
                if (this.ve) {
        var a = this.Fi;
                if (!(null === a || a.Zb.vg || a.Zb.sd || !this.lH && a.wb.Fd.ha)) {
        var b = a.kp;
                (b && b.visible && isNaN(b.width) || isNaN(b.height)) && Ki(a);
                var c = this.jb, b = this.Qg, d = this.xz, f = this.tH;
                d.width = c.width;
                d.height = c.height;
                b.au = "";
                b.setTransform(1, 0, 0, 1, 0, 0);
                b.clearRect(0, 0, this.jb.width, this.jb.height);
                var g = this.ld;
                g.reset();
                1 !== this.nc && g.scale(this.scale);
                0 === this.position.x && 0 === this.position.y ||
                g.translate( - this.Ma.x, - this.Ma.y);
                b.setTransform(g.m11, g.m12, g.m21, g.m22, g.dx, g.dy);
                for (var h = this.Du, k = this.xb, l = a.Xb.length, g = 0; g < l; g++) {
        var m = a.Xb.n[g], n = b, p = k, q = h;
                void 0 === q && (q = !0);
                if (q || !m.yc)
                for (var m = m.Fb, q = this.scale, r = m.length, s = 0; s < r; s++) {
        var u = m.n[s], v = u.pa;
                v.Qf(p) && (1 < v.width * q || 1 < v.height * q ? u.Ue(n, this) : Sh(u, n))
                }
        }
        f.drawImage(c, 0, 0);
                e && e.Rz && (f.fillStyle = "red", f.fillRect(0, d.height / 2, d.width, 4));
                a = this.Xb.n;
                c = this.Xb.length;
                for (g = 0; g < c; g++)
                a[g].Ue(b, this);
                this.ve = this.Hk = !1
                }
        }
        };
        t.g(Yi, "observed", Yi.prototype.rJ);
        t.defineProperty(Yi, {rJ: "observed"}, function() {
        return this.Fi
                }, function(a) {
        var b = this.Fi;
                null !== a && t.l(a, z, Yi, "observed");
                b === a || a instanceof Yi || (null !== b && (this.remove(this.sg), b.MF("ViewportBoundsChanged", this.HF), b.MF("DocumentBoundsChanged", this.GF), b.im.remove(this)), this.Fi = a, null !== a && (a.Jz("ViewportBoundsChanged", this.HF), a.Jz("DocumentBoundsChanged", this.GF), a.im.add(this), this.add(this.sg), Zj(this)), this.Mc(), this.j("observed", b, a))
                });
        t.g(Yi, "box", Yi.prototype.sg);
        t.defineProperty(Yi, {sg: "box"}, function() {
        return this.Il
                }, function(a) {
        var b = this.Il;
                b !== a && (this.Il = a, this.remove(b), this.add(this.Il), Zj(this), this.j("box", b, a))
                });
        t.g(Yi, "drawsTemporaryLayers", Yi.prototype.AI);
        t.defineProperty(Yi, {AI: "drawsTemporaryLayers"}, function() {
        return this.Du
                }, function(a) {
        this.Du !== a && (this.Du = a, this.SA())
                });
        function Zj(a) {
        var b = a.sg;
                if (null !== b) {
        var c = a.Fi;
                if (null !== c) {
        a.ve = !0;
                var c = c.xb, d = b.Mt, f = t.Al();
                f.p(c.width, c.height);
                d.Ca = f;
                t.bk(f);
                a = 2 / a.scale;
                d instanceof W && (d.fb = a);
                b.location = new w(c.x - a / 2, c.y - a / 2)
        }
        }
        }
Yi.prototype.pf = function() {
var a = this.Fi;
        return null === a ? H.eH : a.Ed
        };
        Yi.prototype.Dt = function(a) {
        this.Wb || (yi(this), this.ka(), Ji(this), this.Mc(), Zj(this), this.Ba("ViewportBoundsChanged", a))
                };
        function Yj() {
        be.call(this);
                this.name = "MoveBox"
        }
t.Ka(Yj, be);
        Yj.prototype.doStart = function() {
        this.ha = this.h.Hd = !0
                };
        Yj.prototype.doMouseMove = function() {
        if (this.ha) {
        var a = this.h;
                if (null !== a && null !== a.Fi) {
        var b = a.Fi;
                if (null !== b) {
        var c = b.xb, d = a.R.ea;
                b.position = new w(d.x - c.width / 2, d.y - c.height / 2);
                a.Zd()
                }
        }
        }
        };
        Yj.prototype.doMouseUp = function() {
        this.ha && this.doMouseMove();
                this.stopTool()
                };
        Yj.prototype.doStop = function() {
        this.ha = !1;
                var a = this.h;
                null !== a && (a.Hd = !1, Zj(a))
                };
        function fa(a) {
        1 < arguments.length && t.m("Brush constructor can take at most one optional argument, the Brush type.");
                t.Ac(this);
                this.ob = !1;
                void 0 === a ? (this.da = Od, this.zn = "black") : "string" === typeof a ? (this.da = Od, e && t.To("Brush constructor", a), this.zn = a) : (e && t.Aa(a, fa, fa, "constructor:type"), this.da = a, this.zn = "black");
                var b = this.da;
                b === Zd ? (this.Ao = Fb, this.Pn = Ob) : this.Pn = b === $d ? this.Ao = Kb : this.Ao = wb;
                this.Jv = 0;
                this.Eu = NaN;
                this.Pg = this.vv = this.Og = null;
                this.oy = this.py = 0
        }
t.ga("Brush", fa);
        var Od;
        fa.Solid = Od = t.w(fa, "Solid", 0);
        var Zd;
        fa.Linear = Zd = t.w(fa, "Linear", 1);
        var $d;
        fa.Radial = $d = t.w(fa, "Radial", 2);
        var ak;
        fa.Pattern = ak = t.w(fa, "Pattern", 4);
        var ea;
        fa.isValidColor = ea = function(a) {
        if ("black" === a)
                return!0;
                if ("" === a)
                return!1;
                e && t.i(a, "string", fa, "isValidColor");
                var b = t.kn;
                b.fillStyle = "#000000";
                var c = b.fillStyle;
                b.fillStyle = a;
                if (b.fillStyle !== c)
                return!0;
                b.fillStyle = "#FFFFFF";
                c = b.fillStyle;
                b.fillStyle = a;
                return b.fillStyle !== c
                };
        fa.prototype.copy = function() {
        var a = new fa;
                a.da = this.da;
                a.zn = this.zn;
                a.Ao = this.Ao.Z();
                a.Pn = this.Pn.Z();
                a.Jv = this.Jv;
                a.Eu = this.Eu;
                null !== this.Og && (a.Og = this.Og.copy());
                a.vv = this.vv;
                return a
                };
        fa.prototype.Ja = function() {
        this.freeze();
                Object.freeze(this);
                return this
                };
        fa.prototype.freeze = function() {
        this.ob = !0;
                null !== this.Og && this.Og.freeze();
                return this
                };
        fa.prototype.La = function() {
        Object.isFrozen(this) && t.m("cannot thaw constant: " + this);
                this.ob = !1;
                null !== this.Og && this.Og.La();
                return this
                };
        fa.prototype.toString = function() {
        var a = "Brush(";
                if (this.type === Od)
                a += this.color;
                else if (a = this.type === Zd ? a + "Linear " : this.type === $d ? a + "Radial " : this.type === ak ? a + "Pattern " : a + "(unknown) ", a += this.start + " " + this.end, null !== this.Vo)
                for (var b = this.Vo.k; b.next(); )
                a += " " + b.key + ":" + b.value;
                return a + ")"
                };
        fa.prototype.addColorStop = fa.prototype.addColorStop = function(a, b) {
        t.L(this);
                ("number" !== typeof a || !isFinite(a) || 1 < a || 0 > a) && t.la(a, "0 <= loc <= 1", fa, "addColorStop:loc");
                t.i(b, "string", fa, "addColorStop:color");
                null === this.Og && (this.Og = new ja("number", "string"));
                this.Og.add(a, b);
                this.da === Od && (this.type = Zd);
                this.Pg = null
                };
        t.g(fa, "type", fa.prototype.type);
        t.defineProperty(fa, {type: "type"}, function() {
        return this.da
                }, function(a) {
        t.L(this, a);
                t.Aa(a, fa, fa, "type");
                this.da = a;
                this.start.Ge() && (a === Zd ? this.start = Fb : a === $d && (this.start = Kb));
                this.end.Ge() && (a === Zd ? this.end = Ob : a === $d && (this.end = Kb));
                this.Pg = null
                });
        t.g(fa, "color", fa.prototype.color);
        t.defineProperty(fa, {color: "color"}, function() {
        return this.zn
                }, function(a) {
        t.L(this, a);
                t.i(a, "string", fa, "color");
                this.zn = a;
                this.Pg = null
                });
        t.g(fa, "start", fa.prototype.start);
        t.defineProperty(fa, {start: "start"}, function() {
        return this.Ao
                }, function(a) {
        t.L(this, a);
                a instanceof I || t.bc(a, "Spot", fa, "start");
                this.Ao = a.Z();
                this.Pg = null
                });
        t.g(fa, "end", fa.prototype.end);
        t.defineProperty(fa, {end: "end"}, function() {
        return this.Pn
                }, function(a) {
        t.L(this, a);
                a instanceof I || t.bc(a, "Spot", fa, "end");
                this.Pn = a.Z();
                this.Pg = null
                });
        t.g(fa, "startRadius", fa.prototype.Up);
        t.defineProperty(fa, {Up: "startRadius"}, function() {
        return this.Jv
                }, function(a) {
        t.L(this, a);
                t.q(a, fa, "startRadius");
                0 > a && t.la(a, ">= zero", fa, "startRadius");
                this.Jv = a;
                this.Pg = null
                });
        t.g(fa, "endRadius", fa.prototype.$o);
        t.defineProperty(fa, {$o: "endRadius"}, function() {
        return this.Eu
                }, function(a) {
        t.L(this, a);
                t.q(a, fa, "endRadius");
                0 > a && t.la(a, ">= zero", fa, "endRadius");
                this.Eu = a;
                this.Pg = null
                });
        t.g(fa, "colorStops", fa.prototype.Vo);
        t.defineProperty(fa, {Vo: "colorStops"}, function() {
        return this.Og
                }, function(a) {
        t.L(this, a);
                e && t.l(a, ja, fa, "colorStops");
                this.Og = a;
                this.Pg = null
                });
        t.g(fa, "pattern", fa.prototype.pattern);
        t.defineProperty(fa, {pattern: "pattern"}, function() {
        return this.vv
                }, function(a) {
        t.L(this, a);
                this.vv = a;
                this.Pg = null
                });
        fa.randomColor = function(a, b) {
        void 0 === a && (a = 128);
                e && (t.q(a, fa, "randomColor:min"), (0 > a || 255 < a) && t.la(a, "0 <= min <= 255", fa, "randomColor:min"));
                void 0 === b && (b = Math.max(a, 255));
                e && (t.q(b, fa, "randomColor:max"), (b < a || 255 < b) && t.la(b, "min <= max <= 255", fa, "randomColor:max"));
                var c = Math.abs(b - a), d = Math.floor(a + Math.random() * c).toString(16), f = Math.floor(a + Math.random() * c).toString(16), c = Math.floor(a + Math.random() * c).toString(16);
                2 > d.length && (d = "0" + d);
                2 > f.length && (f = "0" + f);
                2 > c.length && (c = "0" + c);
                return"#" +
                d + f + c
                };
        function Q() {
        t.Ac(this);
                this.ma = 30723;
                this.If = 1;
                this.Hi = null;
                this.Yb = "";
                this.uc = this.Lb = null;
                this.Ma = (new w(NaN, NaN)).freeze();
                this.hf = (new ga(NaN, NaN)).freeze();
                this.Fj = H.fq;
                this.Ej = H.dH;
                this.ld = new ha;
                this.jk = new ha;
                this.Lk = new ha;
                this.nc = 1;
                this.wn = 0;
                this.Oh = Wg;
                this.rr = H.eq;
                this.Tc = (new x(NaN, NaN, NaN, NaN)).freeze();
                this.cc = (new x(NaN, NaN, NaN, NaN)).freeze();
                this.gd = (new x(0, 0, NaN, NaN)).freeze();
                this.ys = this.Mq = this.P = this.Mr = this.Nr = null;
                this.zs = this.Nq = Infinity;
                this.lq = this.ue = xb;
                this.$r = 0;
                this.Kj =
                1;
                this.sq = 0;
                this.rj = 1;
                this.ds = - Infinity;
                this.cs = 0;
                this.es = H.mj;
                this.fs = zg;
                this.zq = "";
                this.km = this.oi = this.Kl = this.Ic = this.Q = null
        }
t.ga("GraphObject", Q);
        t.Xh(Q);
        Q.prototype.cloneProtected = function(a) {
        a.ma = this.ma | 6144;
                a.If = this.If;
                a.Yb = this.Yb;
                a.Lb = this.Lb;
                a.uc = this.uc;
                a.Ma.assign(this.Ma);
                a.hf.assign(this.hf);
                a.Fj = this.Fj.Z();
                a.Ej = this.Ej.Z();
                a.Lk = this.Lk.copy();
                a.nc = this.nc;
                a.wn = this.wn;
                a.Oh = this.Oh;
                a.rr = this.rr.Z();
                a.Tc.assign(this.Tc);
                a.cc.assign(this.cc);
                a.gd.assign(this.gd);
                a.Mr = this.Mr;
                if (null !== this.P) {
        var b = this.P;
                a.P = {Dh: b.Dh.Z(), Th: b.Th.Z(), Ah: b.Ah, Qh: b.Qh, zh: b.zh, Ph: b.Ph, Ch: b.Ch, Sh: b.Sh}
        } else
                a.P = null;
                a.Mq = this.Mq;
                a.Nq = this.Nq;
                a.ys = this.ys;
                a.zs =
                this.zs;
                a.ue = this.ue.Z();
                a.lq = this.lq.Z();
                a.$r = this.$r;
                a.Kj = this.Kj;
                a.sq = this.sq;
                a.rj = this.rj;
                a.ds = this.ds;
                a.cs = this.cs;
                a.es = this.es.Z();
                a.fs = this.fs;
                a.zq = this.zq;
                null !== this.Q ? (b = this.Q, a.Q = {ni: b.ni, ti: b.ti, pi: b.pi, Cr: b.Cr, Dr: b.Dr, Di: b.Di, Ci: b.Ci, Bi: b.Bi, Ar: b.Ar, Br: b.Br, Ai: b.Ai, hq: b.hq, iq: b.iq, jq: b.jq, gq: b.gq, Ni: b.Ni, qi: b.qi}) : a.Q = null;
                a.Ic = this.Ic;
                if (Array.isArray(this.Kl))
                for (a.Kl = this.Kl.slice(0), b = 0; b < this.Kl.length; b++) {
        var c = this.Kl[b];
                a[c] = this[c]
                }
        null !== this.oi && (a.oi = this.oi.copy())
                };
        Q.prototype.Yh = function(a) {
        a.Nr = null;
                a.km = null;
                a.fa()
                };
        Q.prototype.copy = function() {
        var a = new this.constructor;
                this.cloneProtected(a);
                return a
                };
        Q.prototype.toString = function() {
        return t.ug(Object.getPrototypeOf(this)) + "#" + t.od(this)
                };
        var Vg;
        Q.None = Vg = t.w(Q, "None", 0);
        var Wg;
        Q.Default = Wg = t.w(Q, "Default", 0);
        var bk;
        Q.Vertical = bk = t.w(Q, "Vertical", 4);
        var ck;
        Q.Horizontal = ck = t.w(Q, "Horizontal", 5);
        var Cc;
        Q.Fill = Cc = t.w(Q, "Fill", 3);
        var Xg;
        Q.Uniform = Xg = t.w(Q, "Uniform", 1);
        var Yg;
        Q.UniformToFill = Yg = t.w(Q, "UniformToFill", 2);
        function dk(a) {
        a.Q = {ni: null, ti: null, pi: null, Cr: null, Dr: null, Di: null, Ci: null, Bi: null, Ar: null, Br: null, Ai: null, hq: null, iq: null, jq: null, gq: null, Ni: null, qi: null}
        }
aa = Q.prototype;
        aa.Fe = function() {
        this.P = {Dh: wb, Th: wb, Ah: 10, Qh: 10, zh: ek, Ph: ek, Ch: 0, Sh: 0}
        };
        function fk(a, b, c, d, f, g, h) {
        var k = 0.001, l = g.length;
                a.moveTo(b, c);
                d -= b;
                k = f - c;
                0 === d && (d = 0.001);
                f = k / d;
                for (var m = Math.sqrt(d * d + k * k), n = 0, p = !0, q = 0 === h ? !1 : !0; 0.1 <= m; ) {
        if (q) {
        k = g[n++ % l];
                for (k -= h; 0 > k; )
                k += g[n++ % l], p = !p;
                q = !1
        } else
                k = g[n++ % l];
                k > m && (k = m);
                var r = Math.sqrt(k * k / (1 + f * f));
                0 > d && (r = - r);
                b += r;
                c += f * r;
                p ? a.lineTo(b, c) : a.moveTo(b, c);
                m -= k;
                p = !p
        }
        }
aa.Zc = function(a, b, c, d, f, g, h) {
var k = this.S;
        null !== k && (k.fn(a, b, c, d, f, g, h), 0 !== (this.ma & 1024) && c === this && a === vd && gk(this, k, b))
        };
        function gk(a, b, c) {
        var d = a.dp();
                if (null !== d)
                for (var f = a.Ic.k; f.next(); ) {
        var g = f.value, h = g.Rt;
                if (null !== h) {
        var k = d.me(h);
                if (null === k)
                continue;
                g.oB(a, k, c, null)
        } else {
        k = d.data;
                if (null === k)
                continue;
                var l = b.h;
                null !== l && l.Qt || g.oB(a, k, c, l)
        }
        null !== h && (k = d, "" !== h && (k = d.me(h)), null !== k && (h = g.nn, l = d, "" !== h && (l = d.me(h)), null !== l && g.MG(l, k, c)))
        }
        }
aa.j = function(a, b, c) {
this.Zc(vd, a, this, b, c)
        };
        function hk(a, b, c, d, f) {
        var g = a.Tc, h = a.Lk;
                h.reset();
                ik(a, h, b, c, d, f);
                a.Lk = h;
                g.x = b;
                g.y = c;
                g.width = d;
                g.height = f;
                h.pt() || h.GG(g)
        }
function jk(a, b, c, d) {
if (!1 === a.zf)
        return!1;
        d.multiply(a.transform);
        return c ? a.Qf(b, d) : a.Hm(b, d)
        }
aa.AE = function(a, b, c) {
if (!1 === this.zf)
        return!1;
        var d = this.Qa;
        b = a.Zj(b);
        var f = !1;
        c && (f = Ra(a.x, a.y, 0, 0, 0, d.height) < b || Ra(a.x, a.y, 0, d.height, d.width, d.height) < b || Ra(a.x, a.y, d.width, d.height, d.width, 0) < b || Ra(a.x, a.y, d.width, 0, 0, 0) < b);
        c || (f = Ra(a.x, a.y, 0, 0, 0, d.height) < b && Ra(a.x, a.y, 0, d.height, d.width, d.height) < b && Ra(a.x, a.y, d.width, d.height, d.width, 0) < b && Ra(a.x, a.y, d.width, 0, 0, 0) < b);
        return f
        };
        aa.Ef = function() {
        return!0
                };
        Q.prototype.containsPoint = Q.prototype.Ga = function(a) {
        e && t.l(a, w, Q, "containsPoint:p");
                var b = t.K();
                b.assign(a);
                this.transform.Ta(b);
                var c = this.pa;
                if (!c.N())
                return!1;
                if (t.hB) {
        var d = this.Qa, f = this.dk() * (null !== this.h ? this.h.scale : 1), g = 1 / f;
                if (10 > d.width * f && 10 > d.height * f)
                return a = mb(c.x - 5 * g, c.y - 5 * g, c.width + 10 * g, c.height + 10 * g, b.x, b.y), t.B(b), a
                }
        if (void 0 !== this.pc || this instanceof W ? mb(c.x - 5, c.y - 5, c.width + 10, c.height + 10, b.x, b.y) : c.Ga(b)) {
        if (this.oi && !this.oi.Ga(b))
                return!1;
                if (null !== this.uc && c.Ga(b) || null !==
                        this.Lb && this.gd.Ga(a))
                return!0;
                t.B(b);
                return this.Vj(a)
                }
        t.B(b);
                return!1
                };
        Q.prototype.Vj = function(a) {
        var b = this.Qa;
                return mb(0, 0, b.width, b.height, a.x, a.y)
                };
        Q.prototype.containsRect = Q.prototype.Wj = function(a) {
        e && t.l(a, x, Q, "containsRect:r");
                if (0 === this.angle)
                return this.pa.Wj(a);
                var b = this.Qa, b = t.hk(0, 0, b.width, b.height), c = this.transform, d = !1, f = t.lc(a.x, a.y);
                b.Ga(c.ai(f)) && (f.p(a.x, a.bottom), b.Ga(c.ai(f)) && (f.p(a.right, a.bottom), b.Ga(c.ai(f)) && (f.p(a.right, a.y), b.Ga(c.ai(f)) && (d = !0))));
                t.B(f);
                t.hc(b);
                return d
                };
        Q.prototype.containedInRect = Q.prototype.Hm = function(a, b) {
        e && t.l(a, x, Q, "containedInRect:r");
                if (void 0 === b)
                return a.Wj(this.pa);
                var c = this.Qa, d = !1, f = t.lc(0, 0);
                a.Ga(b.Ta(f)) && (f.p(0, c.height), a.Ga(b.Ta(f)) && (f.p(c.width, c.height), a.Ga(b.Ta(f)) && (f.p(c.width, 0), a.Ga(b.Ta(f)) && (d = !0))));
                return d
                };
        Q.prototype.intersectsRect = Q.prototype.Qf = function(a, b) {
        e && t.l(a, x, Q, "intersectsRect:r");
                if (void 0 === b && (b = this.transform, 0 === this.angle))
                return a.Qf(this.pa);
                var c = this.Qa, d = b, f = t.lc(0, 0), g = t.lc(0, c.height), h = t.lc(c.width, c.height), k = t.lc(c.width, 0), l = !1;
                if (a.Ga(d.Ta(f)) || a.Ga(d.Ta(g)) || a.Ga(d.Ta(h)) || a.Ga(d.Ta(k)))
                l = !0;
                else {
                var c = t.hk(0, 0, c.width, c.height), m = t.lc(a.x, a.y);
                        c.Ga(d.ai(m)) ? l = !0 : (m.p(a.x, a.bottom), c.Ga(d.ai(m)) ? l = !0 : (m.p(a.right, a.bottom), c.Ga(d.ai(m)) ? l = !0 : (m.p(a.right, a.y), c.Ga(d.ai(m)) &&
                        (l = !0))));
                        t.B(m);
                        t.hc(c);
                        !l && (H.Kw(a, f, g) || H.Kw(a, g, h) || H.Kw(a, h, k) || H.Kw(a, k, f)) && (l = !0)
                        }
        t.B(f);
                t.B(g);
                t.B(h);
                t.B(k);
                return l
                };
        Q.prototype.getDocumentPoint = Q.prototype.qb = function(a, b) {
        void 0 === b && (b = new w);
                a.Ge() && t.m("getDocumentPoint:s Spot must be real: " + a.toString());
                var c = this.Qa;
                b.p(a.x * c.width + a.offsetX, a.y * c.height + a.offsetY);
                this.ke.Ta(b);
                return b
                };
        Q.prototype.getDocumentAngle = Q.prototype.gl = function() {
        var a = this.ke, a = 180 / Math.PI * Math.atan2(a.m12, a.m11);
                0 > a && (a += 360);
                return a
                };
        Q.prototype.getDocumentScale = Q.prototype.dk = function() {
        var a = this.nc;
                return null !== this.ia ? a * this.ia.dk() : a
                };
        Q.prototype.getLocalPoint = Q.prototype.IE = function(a, b) {
        void 0 === b && (b = new w);
                b.assign(a);
                this.ke.ai(b);
                return b
                };
        Q.prototype.getNearestIntersectionPoint = Q.prototype.kl = function(a, b, c) {
        return this.jp(a.x, a.y, b.x, b.y, c)
                };
        aa = Q.prototype;
        aa.jp = function(a, b, c, d, f) {
        var g = this.transform, h = 1 / (g.m11 * g.m22 - g.m12 * g.m21), k = g.m22 * h, l = - g.m12 * h, m = - g.m21 * h, n = g.m11 * h, p = h * (g.m21 * g.dy - g.m22 * g.dx), q = h * (g.m12 * g.dx - g.m11 * g.dy);
                if (null !== this.Zk)
                return g = this.pa, H.kl(g.left, g.top, g.right, g.bottom, a, b, c, d, f);
                h = a * k + b * m + p;
                a = a * l + b * n + q;
                b = c * k + d * m + p;
                c = c * l + d * n + q;
                f.p(0, 0);
                d = this.Qa;
                c = H.kl(0, 0, d.width, d.height, h, a, b, c, f);
                f.transform(g);
                return c
                };
        function ih(a, b, c, d, f) {
        if (!1 !== Pi(a)) {
        var g = a.margin, h = g.top + g.bottom;
                b = Math.max(b - (g.right + g.left), 0);
                c = Math.max(c - h, 0);
                g = a.angle;
                if (90 === g || 270 === g)
                g = b, b = c, c = g, g = d, d = f, f = g;
                g = a.Ca;
                h = 0;
                a.fb && (h = a.fb);
                b = isFinite(g.width) ? g.width + h : b;
                c = isFinite(g.height) ? g.height + h : c;
                var g = d || 0, h = f || 0, k = a instanceof y;
                switch (kk(a)) {
        case Vg:
                h = g = 0;
                k && (c = b = Infinity);
                break;
                case Cc:
                isFinite(b) && b > d && (g = b);
                isFinite(c) && c > f && (h = c);
                break;
                case ck:
                isFinite(b) && b > d && (g = b);
                h = 0;
                k && (c = Infinity);
                break;
                case bk:
                isFinite(c) && c > f && (h =
                c), g = 0, k && (b = Infinity)
        }
        var k = a.He, l = a.Rf;
                g > k.width && l.width < k.width && (g = k.width);
                h > k.height && l.height < k.height && (h = k.height);
                d = Math.max(g / a.scale, l.width);
                f = Math.max(h / a.scale, l.height);
                k.width < d && (d = Math.min(l.width, d));
                k.height < f && (f = Math.min(l.height, f));
                b = Math.min(k.width, b);
                c = Math.min(k.height, c);
                b = Math.max(d, b);
                c = Math.max(f, c);
                a.Tc.La();
                a.tt(b, c, d, f);
                a.Tc.freeze();
                a.Tc.N() || t.m("Non-real measuredBounds has been set. Object " + a + ", measuredBounds: " + a.Tc.toString());
                lk(a, !1)
        }
        }
aa.Jc = function(a, b, c, d, f) {
mk(this);
        var g = t.Df();
        g.assign(this.cc);
        this.cc.La();
        if (!1 === Qi(this)) {
var h = this.cc;
        h.x = a;
        h.y = b;
        h.width = c;
        h.height = d
        } else
        this.Uj(a, b, c, d);
        this.cc.freeze();
        this.oi = void 0 === f ? null : f;
        c = !1;
        void 0 !== f ? c = !0 : this.ia && (f = this.ia.gd, d = this.Ea, null !== this.Zk && (d = this.cc), c = b + d.height, d = a + d.width, c = !(0 <= a + 0.05 && d <= f.width + 0.05 && 0 <= b + 0.05 && c <= f.height + 0.05), this instanceof na && (a = this.gd, this.av > a.height || this.oo.xg > a.width)) && (c = !0);
        this.ma = c ? this.ma | 256 : this.ma & - 257;
        this.cc.N() ||
        t.m("Non-real actualBounds has been set. Object " + this + ", actualBounds: " + this.cc.toString());
        nk(this, g, this.cc);
        t.hc(g)
        };
        aa.Uj = function() {
        };
        function ok(a, b, c, d, f) {
        var g = a.pa;
                g.x = b;
                g.y = c;
                g.width = d;
                g.height = f;
                if (!a.Ca.N()) {
        g = a.Tc;
                c = a.margin;
                b = c.right + c.left;
                var h = c.top + c.bottom;
                c = g.width + b;
                g = g.height + h;
                d += b;
                f += h;
                b = kk(a);
                c === d && g === f && (b = Vg);
                switch (b) {
        case Vg:
                if (c > d || g > f)
                lk(a, !0), ih(a, c > d ? d : c, g > f ? f : g);
                break;
                case Cc:
                lk(a, !0);
                ih(a, d, f, 0, 0);
                break;
                case ck:
                lk(a, !0);
                ih(a, d, g, 0, 0);
                break;
                case bk:
                lk(a, !0), ih(a, c, f, 0, 0)
        }
        }
        }
function nk(a, b, c) {
pk(a, !1);
        var d = a.S;
        if (null !== d) {
var f = d.h;
        if (null !== f)
        if (qk(d), a instanceof E) {
var g = !1, d = b.N();
        if (!1 === f.wi) {
var h = f.Ed, k = f.padding, l = h.x + k.left, m = h.y + k.top, n = h.width - 2 * k.right, h = h.height - 2 * k.bottom;
        d && b.x > l && b.y > m && b.right < n && b.bottom < h && c.x > l && c.y > m && c.right < n && c.bottom < h && (g = !0)
        }
0 !== (a.W & 65536) !== !0 && b.M(c) || cj(a, g, f);
        f.nz && null !== f.tj ? (g = null, d && (g = t.Df(), Uh(a, b, g)), f.ka(c.N() ? Uh(a, c) : null, g), null !== g && t.hc(g)) : f.ka()
        } else
        rk(a, d), a.ka(), b = a.S, null !== b && (b.Mt !== a && b.TF !== a &&
        b.YF !== a || sk(b, !0))
        }
}
function rk(a, b) {
null !== a.Ld && sk(b, !0);
        if (a instanceof y)
        for (var c = a.xa, d = c.length, f = 0; f < d; f++)
        rk(c.n[f], b)
        }
aa.Ue = function(a, b) {
if (this.visible) {
var c = this.opacity, d = 1;
        if (1 !== c) {
if (0 === c)
        return;
        d = a.globalAlpha;
        a.globalAlpha = d * c
        }
if (a instanceof nc)
        a:{
        if (this.visible) {
        var f = null, g = a.Rw;
                if (this instanceof y && (this.type === tk || this.type === uk))
                vk(this, a, b);
                else {
                var h = this.cc;
                        if (0 !== h.width && 0 !== h.height && !isNaN(h.x) && !isNaN(h.y)) {
                var k = this.transform, l = this.ia, m = this.jk;
                        m.reset();
                        null !== l && (l.Ef() ? m.multiply(l.ke) : null !== l.ia && m.multiply(l.ia.ke));
                        m.multiply(this.ld);
                        var m = 0 !== (this.ma & 256), n = !1;
                        this instanceof
                        na && wk(this, a);
                        if (m) {
                n = l.Ef() ? l.Qa : l.pa;
                        if (this.oi)
                        var p = this.oi, q = p.x, r = p.y, s = p.width, p = p.height;
                        else
                        q = Math.max(h.x, n.x), r = Math.max(h.y, n.y), s = Math.min(h.right, n.right) - q, p = Math.min(h.bottom, n.bottom) - r;
                        if (q > h.width + h.x || h.x > n.width + n.x || r > h.height + h.y || h.y > n.height + n.y)
                        break a;
                        n = !0;
                        rc(a, 1, 0, 0, 1, 0, 0);
                        a.save();
                        a.beginPath();
                        a.rect(q, r, s, p);
                        a.clip()
                        }
                q = !1;
                        if (this instanceof E && (q = !0, !this.Sa()))
                        break a;
                        r = !1;
                        s = b.Rk;
                        this.S && s.drawShadows && (r = this.S.fj);
                        a.Yi.cf = [1, 0, 0, 1, 0, 0];
                        null !== this.uc && (xk(this,
                                a, this.uc, !0, !0), this.uc instanceof fa && this.uc.type === $d ? (a.beginPath(), a.rect(h.x, h.y, h.width, h.height), yk(a, this.uc, !0)) : a.fillRect(h.x, h.y, h.width, h.height));
                        q && this.fj && s.drawShadows && (rc(a, 1, 0, 0, 1, 0, 0), h = this.tm, a.shadowOffsetX = h.x, a.shadowOffsetY = h.y, a.shadowColor = this.sm, a.shadowBlur = this.rm / b.scale, a.bb());
                        this instanceof y ? rc(a, k.m11, k.m12, k.m21, k.m22, k.dx, k.dy) : a.Yi.cf = [k.m11, k.m12, k.m21, k.m22, k.dx, k.dy];
                        if (null !== this.Lb) {
                var p = this.Qa, h = k = 0, s = p.width, p = p.height, u = 0;
                        this instanceof W &&
                        (p = this.Oa.Ob, k = p.x, h = p.y, s = p.width, p = p.height, u = this.$g);
                        xk(this, a, this.Lb, !0);
                        this.Lb instanceof fa && this.Lb.type === $d ? (a.beginPath(), a.rect(k - u / 2, h - u / 2, s + u, p + u), yk(a, this.Lb, !0)) : a.fillRect(k - u / 2, h - u / 2, s + u, p + u)
                        }
                if (r && (null !== this.Lb || null !== this.uc || null !== l && 0 !== (l.ma & 512) || null !== l && l.type === di && l.zw() !== this)) {
                zk(this, !0);
                        var v = [a.shadowOffsetX, a.shadowOffsetY, a.shadowBlur];
                        a.shadowOffsetX = 0;
                        a.shadowOffsetY = 0;
                        a.shadowBlur = 0
                        } else
                        zk(this, !1);
                        this.el(a, b);
                        r && 0 !== (this.ma & 512) === !0 && (a.shadowOffsetX =
                        v[0], a.shadowOffsetY = v[1], a.shadowBlur = v[2]);
                        q && r && (a.shadowOffsetX = 0, a.shadowOffsetY = 0, a.shadowBlur = 0);
                        m ? (a.restore(), n && a.uf.pop(), vi(b, a)) : this instanceof y && (f = a.uf.pop());
                        q && r && a.uf.pop();
                        null !== a.wE && (null === f && (g === a.Rw ? (rc(a, 1, 0, 0, 1, 0, 0), v = a.uf.pop()) : v = a.Rw, f = v), a.wE(this, f))
                        }
                }
        }
        }
else if (this instanceof y && (this.type === tk || this.type === uk))
        vk(this, a, b);
        else if (m = this.cc, 0 !== m.width && 0 !== m.height && !isNaN(m.x) && !isNaN(m.y)) {
v = this.transform;
        g = this.ia;
        l = this.jk;
        l.reset();
        null !== g && (g.Ef() ? l.multiply(g.ke) :
                null !== g.ia && l.multiply(g.ia.ke));
        l.multiply(this.ld);
        l = 0 !== (this.ma & 256);
        this instanceof na && wk(this, a);
        if (l) {
e && e.zI && t.trace("clip" + this.toString());
        n = g.Ef() ? g.Qa : g.pa;
        this.oi ? (r = this.oi, k = r.x, h = r.y, q = r.width, r = r.height) : (k = Math.max(m.x, n.x), h = Math.max(m.y, n.y), q = Math.min(m.right, n.right) - k, r = Math.min(m.bottom, n.bottom) - h);
        if (k > m.width + m.x || m.x > n.width + n.x || h > m.height + m.y || m.y > n.height + n.y) {
1 !== c && (a.globalAlpha = d);
        return
        }
a.save();
        a.beginPath();
        a.rect(k, h, q, r);
        a.clip()
        }
h = b.Rk;
        n = !1;
        if (this instanceof
                E) {
n = !0;
        if (!this.Sa()) {
1 !== c && (a.globalAlpha = d);
        return
        }
this.fj && h.drawShadows && (k = this.tm, a.shadowOffsetX = k.x * b.scale, a.shadowOffsetY = k.y * b.scale, a.shadowColor = this.sm, a.shadowBlur = this.rm)
        }
k = !1;
        this.S && h.drawShadows && (k = this.S.fj);
        null !== this.uc && (xk(this, a, this.uc, !0, !0), this.uc instanceof fa && this.uc.type === $d ? (a.beginPath(), a.rect(m.x, m.y, m.width, m.height), yk(a, this.uc, !0)) : a.fillRect(m.x, m.y, m.width, m.height));
        v.pt() || a.transform(v.m11, v.m12, v.m21, v.m22, v.dx, v.dy);
        null !== this.Lb && (r = this.Qa,
                h = m = 0, q = r.width, r = r.height, s = 0, this instanceof W && (r = this.Oa.Ob, m = r.x, h = r.y, q = r.width, r = r.height, s = this.$g), xk(this, a, this.Lb, !0), this.Lb instanceof fa && this.Lb.type === $d ? (a.beginPath(), a.rect(m - s / 2, h - s / 2, q + s, r + s), yk(a, this.Lb, !0)) : a.fillRect(m - s / 2, h - s / 2, q + s, r + s));
        k && (null !== this.Lb || null !== this.uc || null !== g && 0 !== (g.ma & 512) || null !== g && (g.type === di || g.type === Tg) && g.zw() !== this) ? (zk(this, !0), f = [a.shadowOffsetX, a.shadowOffsetY, a.shadowBlur], a.shadowOffsetX = 0, a.shadowOffsetY = 0, a.shadowBlur = 0) : zk(this,
        !1);
        this.el(a, b);
        k && 0 !== (this.ma & 512) === !0 && (a.shadowOffsetX = f[0], a.shadowOffsetY = f[1], a.shadowBlur = f[2]);
        n && k && (a.shadowOffsetX = 0, a.shadowOffsetY = 0, a.shadowBlur = 0);
        l ? (a.restore(), this instanceof y ? vi(b, a, !0) : vi(b, a, !1)) : v.pt() || (f = 1 / (v.m11 * v.m22 - v.m12 * v.m21), a.transform(v.m22 * f, - v.m12 * f, - v.m21 * f, v.m11 * f, f * (v.m21 * v.dy - v.m22 * v.dx), f * (v.m12 * v.dx - v.m11 * v.dy)))
        }
1 !== c && (a.globalAlpha = d)
        }
};
        function vk(a, b, c) {
        var d = a.cc;
                0 === d.width || 0 === d.height || isNaN(d.x) || isNaN(d.y) || (null !== a.uc && (xk(a, b, a.uc, !0, !0), a.uc instanceof fa && a.uc.type === $d ? (b.beginPath(), b.rect(d.x, d.y, d.width, d.height), yk(b, a.uc, !0)) : b.fillRect(d.x, d.y, d.width, d.height)), null !== a.Lb && (xk(a, b, a.Lb, !0), a.Lb instanceof fa && a.Lb.type === $d ? (b.beginPath(), b.rect(d.x, d.y, d.width, d.height), yk(b, a.Lb, !0)) : b.fillRect(d.x, d.y, d.width, d.height)), a.el(b, c))
        }
aa.el = function() {
};
        function yk(a, b, c) {
        if (c)
                if (a instanceof CanvasRenderingContext2D && b instanceof fa && b.type === $d) {
        var d = b.py;
                b = b.oy;
                b > d ? (a.scale(d / b, 1), a.translate((b - d) / 2, 0), c ? a.fill() : a.stroke(), a.translate( - (b - d) / 2, 0), a.scale(1 / (d / b), 1)) : d > b ? (a.scale(1, b / d), a.translate(0, (d - b) / 2), c ? a.fill() : a.stroke(), a.translate(0, - (d - b) / 2), a.scale(1, 1 / (b / d))) : c ? a.fill() : a.stroke()
        } else
                c ? a.fill() : a.stroke();
                else
                a.stroke()
        }
function xk(a, b, c, d, f) {
if (null !== c) {
var g = 1, h = 1;
        if ("string" === typeof c)
        d ? b.rn !== c && (b.fillStyle = c, b.rn = c) : b.sn !== c && (b.strokeStyle = c, b.sn = c);
        else if (c.type === Od)
        c = c.color, d ? b.rn !== c && (b.fillStyle = c, b.rn = c) : b.sn !== c && (b.strokeStyle = c, b.sn = c);
        else {
        var k, h = a.Qa, g = h.width, h = h.height;
                if (f)
                var l = a.pa, g = l.width, h = l.height;
                var m = b instanceof CanvasRenderingContext2D;
                if (m && (c.Pg && c.type === ak || c.py === g && c.oy === h))
                k = c.Pg;
                else {
                var n, p, q = p = 0;
                        f && (l = a.pa, g = l.width, h = l.height, p = l.x, q = l.y);
                        c.start instanceof w ? (a =
                                c.start.x, f = c.start.y) : c.start instanceof I ? (a = c.start.x * g + c.start.offsetX, f = c.start.y * h + c.start.offsetY) : (a = Kb.x * g + c.start.offsetX, f = Kb.y * h + c.start.offsetY);
                        c.end instanceof w ? (l = c.end.x, n = c.end.y) : c.end instanceof I ? (l = c.end.x * g + c.end.offsetX, n = c.end.y * h + c.end.offsetY) : c.type === Zd ? (l = Ob.x * g + c.end.offsetX, n = Ob.y * h + c.end.offsetY) : (l = Kb.x * g + c.end.offsetX, n = Kb.y * h + c.end.offsetY);
                        a += p;
                        l += p;
                        f += q;
                        n += q;
                        c.type === Zd ? k = b.createLinearGradient(a, f, l, n) : c.type === $d ? (p = isNaN(c.$o) ? Math.max(g, h) / 2 : c.$o, isNaN(c.Up) ?
                        (k = 0, p = Math.max(g, h) / 2) : k = c.Up, k = b.createRadialGradient(a, f, k, l, n, p)) : c.type === ak ? k = b.createPattern(c.pattern, "repeat") : t.bc(c.type, "Brush type");
                        if (c.type !== ak && (p = c.Vo))
                        for (p = p.k; p.next(); )
                        k.addColorStop(p.key, p.value);
                        m && (c.Pg = k, c.py = g, c.oy = h)
                        }
        d ? b.rn !== k && (b.fillStyle = k, b.rn = k) : b.sn !== k && (b.strokeStyle = k, b.sn = k)
                }
}
}
Q.prototype.isContainedBy = Q.prototype.dj = function(a) {
if (a instanceof y)
        a:{
        if (this !== a && null !== a)
                for (var b = this.ia; null !== b; ) {
        if (b === a) {
        a = !0;
                break a
                }
        b = b.ia
                }
        a = !1
                }
else
        a = !1;
        return a
        };
        Q.prototype.isVisibleObject = Q.prototype.ol = function() {
        if (!this.visible)
                return!1;
                var a = this.ia;
                return null !== a ? a.ol() : !0
                };
        function Ak(a) {
        if (0 !== (a.ma & 2048) === !0) {
        var b = a.ld;
                b.reset();
                if (!a.cc.N() || !a.Tc.N()) {
        Bk(a, !1);
                return
        }
        b.translate(a.cc.x, a.cc.y);
                b.translate( - a.Ea.x, - a.Ea.y);
                var c = a.Qa;
                ik(a, b, c.x, c.y, c.width, c.height);
                Bk(a, !1);
                Ck(a, !0)
        }
        0 !== (a.ma & 4096) === !0 && (b = a.ia, null === b ? (a.jk.set(a.ld), Ck(a, !1)) : null !== b.ke && (c = a.jk, c.reset(), b.Ef() ? c.multiply(b.jk) : null !== b.ia && c.multiply(b.ia.jk), c.multiply(a.ld), Ck(a, !1)))
        }
function ik(a, b, c, d, f, g) {
1 !== a.scale && b.scale(a.scale);
        if (0 !== a.angle) {
var h = Kb;
        a.bf && a.bf.vd() && (h = a.bf);
        var k = t.K();
        if (a instanceof E && a.kc !== a)
        for (c = a.kc, d = c.Qa, k.Ot(d.x, d.y, d.width, d.height, h), c.Lk.Ta(k), k.offset( - c.Ea.x, - c.Ea.y), h = c.ia; null !== h && h !== a; )
        h.Lk.Ta(k), k.offset( - h.Ea.x, - h.Ea.y), h = h.ia;
        else
        k.Ot(c, d, f, g, h);
        b.rotate(a.angle, k.x, k.y);
        t.B(k)
        }
}
Q.prototype.fa = function(a) {
if (!0 !== Pi(this)) {
lk(this, !0);
        pk(this, !0);
        var b = this.ia;
        null !== b ? a || b.fa() : (a = this.h, null !== a && (this.Sa() && a.cg.add(this), this instanceof S && (a.ja.sb || this.vf(), null !== this.Xd && Dk(this.Xd)), a.Zd()));
        if (this instanceof y) {
var c = null;
        a = this.xa;
        b = a.length;
        this.da === di && (c = Ek(this, a, b)) && c.fa(!0);
        a = a.n;
        for (c = 0; c < b; c++) {
var d = a[c];
        !0 !== Pi(d) && (d.Ca.N() || (d instanceof Ug || d instanceof y || d instanceof na || kk(d) !== Vg) && d.fa(!0))
        }
}
}
};
        function Fk(a) {
        if (!1 === Pi(a) && (lk(a, !0), pk(a, !0), a instanceof y)) {
        a = a.xa.n;
                for (var b = a.length, c = 0; c < b; c++)
                Fk(a[c])
        }
        }
function Dk(a) {
if (!1 === Qi(a)) {
if (null !== a.ia)
        a.ia.fa();
        else {
        var b = a.h;
                null !== b && (a.Sa() && b.cg.add(a), a instanceof S && a.vf(), b.Zd())
                }
pk(a, !0)
        }
}
function mk(a) {
if (0 !== (a.ma & 2048) === !1 && (Bk(a, !0), Ck(a, !0), a instanceof y)) {
a = a.xa.n;
        for (var b = a.length, c = 0; c < b; c++)
        Gk(a[c])
        }
}
function Gk(a) {
Ck(a, !0);
        if (a instanceof y) {
a = a.xa.n;
        for (var b = a.length, c = 0; c < b; c++)
        Gk(a[c])
        }
}
Q.prototype.ka = function() {
if (this instanceof E) {
var a = this.h;
        null !== a && !Qi(this) && !Ri(this) && this.Sa() && this.cc.N() && a.ka(Uh(this, this.cc))
        } else
        null !== this.S && this.S.ka()
        };
        function kk(a) {
        var b = a.gi, c = a.ia;
                if (c && c.da === Hk)
                return Ik(a, c.pe(a.rc), c.oe(a.column));
                if (c && c.da === di && c.zw() === a)
                return Cc;
                if (b === Wg) {
        if (c) {
        c.da === Tg && null === c.Eo && (b = c.xa, Ek(c, b, b.length));
                if (c.Eo === a)
                return Cc;
                a = c.Zz;
                return a === Wg ? Vg : a
        }
        return Vg
        }
        return b
        }
function Ik(a, b, c) {
var d = a.gi;
        if (d !== Wg)
        return d;
        var f = d = void 0;
        switch (b.gi) {
case bk:
        f = !0;
        break;
        case Cc:
        f = !0
        }
switch (c.gi) {
case ck:
        d = !0;
        break;
        case Cc:
        d = !0
        }
a = a.ia.Zz;
        d = void 0 !== d || a !== ck && a !== Cc ? !1 : !0;
        f = void 0 !== f || a !== bk && a !== Cc ? !1 : !0;
        return!0 === d && !0 === f ? Cc : !0 === d ? ck : !0 === f ? bk : Vg
        }
t.g(Q, "segmentOrientation", Q.prototype.Lt);
        t.defineProperty(Q, {Lt: "segmentOrientation"}, function() {
        return this.fs
                }, function(a) {
        var b = this.fs;
                b !== a && (e && t.Aa(a, V, Q, "segmentOrientation"), this.fs = a, this.fa(), this.j("segmentOrientation", b, a))
                });
        t.g(Q, "segmentIndex", Q.prototype.Af);
        t.defineProperty(Q, {Af: "segmentIndex"}, function() {
        return this.ds
                }, function(a) {
        e && t.i(a, "number", Q, "segmentIndex");
                a = Math.round(a);
                var b = this.ds;
                b !== a && (this.ds = a, this.fa(), this.j("segmentIndex", b, a))
                });
        t.g(Q, "segmentFraction", Q.prototype.Kt);
        t.defineProperty(Q, {Kt: "segmentFraction"}, function() {
        return this.cs
                }, function(a) {
        e && t.i(a, "number", Q, "segmentFraction");
                isNaN(a) ? a = 0 : 0 > a ? a = 0 : 1 < a && (a = 1);
                var b = this.cs;
                b !== a && (this.cs = a, this.fa(), this.j("segmentFraction", b, a))
                });
        t.g(Q, "segmentOffset", Q.prototype.ZA);
        t.defineProperty(Q, {ZA: "segmentOffset"}, function() {
        return this.es
                }, function(a) {
        var b = this.es;
                b.M(a) || (e && t.l(a, w, Q, "segmentOffset"), this.es = a = a.Z(), this.fa(), this.j("segmentOffset", b, a))
                });
        t.g(Q, "stretch", Q.prototype.gi);
        t.defineProperty(Q, {gi: "stretch"}, function() {
        return this.Oh
                }, function(a) {
        var b = this.Oh;
                b !== a && (e && t.Aa(a, Q, Q, "stretch"), this.Oh = a, this.fa(), this.j("stretch", b, a))
                });
        t.g(Q, "name", Q.prototype.name);
        t.defineProperty(Q, {name: "name"}, function() {
        return this.Yb
                }, function(a) {
        var b = this.Yb;
                b !== a && (e && t.i(a, "string", Q, "name"), this.Yb = a, this.S && (this.S.Gj = null), this.j("name", b, a))
                });
        t.g(Q, "opacity", Q.prototype.opacity);
        t.defineProperty(Q, {opacity: "opacity"}, function() {
        return this.If
                }, function(a) {
        var b = this.If;
                b !== a && (t.i(a, "number", Q, "opacity"), (0 > a || 1 < a) && t.la(a, "0 <= val <= 1", Q, "opacity"), this.If = a, this.j("opacity", b, a), a = this.h, b = this.S, null !== a && null !== b && a.ka(Uh(b, b.pa)))
                });
        t.g(Q, "visible", Q.prototype.visible);
        t.defineProperty(Q, {visible: "visible"}, function() {
        return 0 !== (this.ma & 1)
                }, function(a) {
        var b = 0 !== (this.ma & 1);
                b !== a && (e && t.i(a, "boolean", Q, "visible"), this.ma ^= 1, this.j("visible", b, a), b = this.ia, null !== b ? b.fa() : this instanceof E && (this.h && this.h.ka(), qk(this), this.gh(a)), this.ka(), Jk(this))
                });
        t.g(Q, "pickable", Q.prototype.zf);
        t.defineProperty(Q, {zf: "pickable"}, function() {
        return 0 !== (this.ma & 2)
                }, function(a) {
        var b = 0 !== (this.ma & 2);
                b !== a && (e && t.i(a, "boolean", Q, "pickable"), this.ma ^= 2, this.j("pickable", b, a))
                });
        t.g(Q, "fromLinkableDuplicates", Q.prototype.DE);
        t.defineProperty(Q, {DE: "fromLinkableDuplicates"}, function() {
        return 0 !== (this.ma & 4)
                }, function(a) {
        var b = 0 !== (this.ma & 4);
                b !== a && (e && t.i(a, "boolean", Q, "fromLinkableDuplicates"), this.ma ^= 4, this.j("fromLinkableDuplicates", b, a))
                });
        t.g(Q, "fromLinkableSelfNode", Q.prototype.EE);
        t.defineProperty(Q, {EE: "fromLinkableSelfNode"}, function() {
        return 0 !== (this.ma & 8)
                }, function(a) {
        var b = 0 !== (this.ma & 8);
                b !== a && (e && t.i(a, "boolean", Q, "fromLinkableSelfNode"), this.ma ^= 8, this.j("fromLinkableSelfNode", b, a))
                });
        t.g(Q, "toLinkableDuplicates", Q.prototype.xG);
        t.defineProperty(Q, {xG: "toLinkableDuplicates"}, function() {
        return 0 !== (this.ma & 16)
                }, function(a) {
        var b = 0 !== (this.ma & 16);
                b !== a && (e && t.i(a, "boolean", Q, "toLinkableDuplicates"), this.ma ^= 16, this.j("toLinkableDuplicates", b, a))
                });
        t.g(Q, "toLinkableSelfNode", Q.prototype.yG);
        t.defineProperty(Q, {yG: "toLinkableSelfNode"}, function() {
        return 0 !== (this.ma & 32)
                }, function(a) {
        var b = 0 !== (this.ma & 32);
                b !== a && (e && t.i(a, "boolean", Q, "toLinkableSelfNode"), this.ma ^= 32, this.j("toLinkableSelfNode", b, a))
                });
        t.g(Q, "isPanelMain", Q.prototype.ej);
        t.defineProperty(Q, {ej: "isPanelMain"}, function() {
        return 0 !== (this.ma & 64)
                }, function(a) {
        var b = 0 !== (this.ma & 64);
                b !== a && (e && t.i(a, "boolean", Q, "isPanelMain"), this.ma ^= 64, this.fa(), this.j("isPanelMain", b, a))
                });
        t.g(Q, "isActionable", Q.prototype.Lw);
        t.defineProperty(Q, {Lw: "isActionable"}, function() {
        return 0 !== (this.ma & 128)
                }, function(a) {
        var b = 0 !== (this.ma & 128);
                b !== a && (e && t.i(a, "boolean", Q, "isActionable"), this.ma ^= 128, this.j("isActionable", b, a))
                });
        t.g(Q, "areaBackground", Q.prototype.Zk);
        t.defineProperty(Q, {Zk: "areaBackground"}, function() {
        return this.uc
                }, function(a) {
        var b = this.uc;
                b !== a && (e && null !== a && t.To(a, "GraphObject.areaBackground"), a instanceof fa && a.freeze(), this.uc = a, this.ka(), this.j("areaBackground", b, a))
                });
        t.g(Q, "background", Q.prototype.background);
        t.defineProperty(Q, {background: "background"}, function() {
        return this.Lb
                }, function(a) {
        var b = this.Lb;
                b !== a && (e && null !== a && t.To(a, "GraphObject.background"), a instanceof fa && a.freeze(), this.Lb = a, this.ka(), this.j("background", b, a))
                });
        function zk(a, b) {
        a.ma = b ? a.ma | 512 : a.ma & - 513
        }
function Kk(a, b) {
a.ma = b ? a.ma | 1024 : a.ma & - 1025
        }
function Bk(a, b) {
a.ma = b ? a.ma | 2048 : a.ma & - 2049
        }
function Ck(a, b) {
a.ma = b ? a.ma | 4096 : a.ma & - 4097
        }
function Pi(a) {
return 0 !== (a.ma & 8192)
        }
function lk(a, b) {
a.ma = b ? a.ma | 8192 : a.ma & - 8193
        }
function Qi(a) {
return 0 !== (a.ma & 16384)
        }
function pk(a, b) {
a.ma = b ? a.ma | 16384 : a.ma & - 16385
        }
t.A(Q, {S: "part"}, function() {
if (this instanceof E)
        return this;
        if (this.km)
        return this.km;
        var a;
        for (a = this.ia; a; ) {
if (a instanceof E)
        return this.km = a;
        a = a.ia
        }
return null
        });
        Q.prototype.wl = function(a) {
        this.Hi = a
                };
        t.A(Q, {ia: "panel"}, function() {
        return this.Hi
                });
        t.A(Q, {layer: "layer"}, function() {
        var a = this.S;
                return null !== a ? a.layer : null
                });
        t.A(Q, {h: "diagram"}, function() {
        var a = this.S;
                return null !== a ? a.h : null
                }, {configurable: !0});
        t.g(Q, "position", Q.prototype.position);
        t.defineProperty(Q, {position: "position"}, function() {
        return this.Ma
                }, function(a) {
        var b = this.Ma;
                b.M(a) || (e && t.l(a, w, Q, "position"), a = a.Z(), this.kG(a, b) && this.j("position", b, a))
                });
        Q.prototype.kG = function(a) {
        this.Ma = a;
                Dk(this);
                mk(this);
                return!0
                };
        Q.prototype.lG = function(a, b) {
        this.Ma.p(a, b);
                Lk(this, !1);
                mk(this)
                };
        t.A(Q, {pa: "actualBounds"}, function() {
        return this.cc
                });
        t.g(Q, "scale", Q.prototype.scale);
        t.defineProperty(Q, {scale: "scale"}, function() {
        return this.nc
                }, function(a) {
        var b = this.nc;
                b !== a && (e && t.q(a, Q, "scale"), 0 >= a && t.m("GraphObject.scale must be greater than zero"), this.nc = a, mk(this), this.fa(), this.j("scale", b, a))
                });
        t.g(Q, "angle", Q.prototype.angle);
        t.defineProperty(Q, {angle: "angle"}, function() {
        return this.wn
                }, function(a) {
        var b = this.wn;
                b !== a && (e && t.q(a, Q, "angle"), a %= 360, 0 > a && (a += 360), b !== a && (this.wn = a, this.fa(), mk(this), this.j("angle", b, a)))
                });
        t.g(Q, "desiredSize", Q.prototype.Ca);
        t.defineProperty(Q, {Ca: "desiredSize"}, function() {
        return this.hf
                }, function(a) {
        var b = this.hf;
                b.M(a) || (e && t.l(a, ga, Q, "desiredSize"), this.hf = a = a.Z(), this.fa(), this instanceof W && this.Ye(), this.j("desiredSize", b, a), a = this.S, null !== a && 0 !== (this.ma & 1024) && (gk(this, a, "width"), gk(this, a, "height")))
                });
        t.g(Q, "width", Q.prototype.width);
        t.defineProperty(Q, {width: "width"}, function() {
        return this.hf.width
                }, function(a) {
        if (this.hf.width !== a) {
        e && t.i(a, "number", Q, "width");
                var b = this.hf;
                this.hf = a = (new ga(a, this.hf.height)).freeze();
                this.fa();
                this instanceof W && this.Ye();
                this.j("desiredSize", b, a);
                b = this.S;
                null !== b && 0 !== (this.ma & 1024) && gk(this, b, "width")
                }
        });
        t.g(Q, "height", Q.prototype.height);
        t.defineProperty(Q, {height: "height"}, function() {
        return this.hf.height
                }, function(a) {
        if (this.hf.height !== a) {
        e && t.i(a, "number", Q, "height");
                var b = this.hf;
                this.hf = a = (new ga(this.hf.width, a)).freeze();
                this.fa();
                this instanceof W && this.Ye();
                this.j("desiredSize", b, a);
                b = this.S;
                null !== b && 0 !== (this.ma & 1024) && gk(this, b, "height")
                }
        });
        t.g(Q, "minSize", Q.prototype.Rf);
        t.defineProperty(Q, {Rf: "minSize"}, function() {
        return this.Fj
                }, function(a) {
        var b = this.Fj;
                b.M(a) || (e && t.l(a, ga, Q, "minSize"), a = a.copy(), isNaN(a.width) && (a.width = 0), isNaN(a.height) && (a.height = 0), a.freeze(), this.Fj = a, this.fa(), this.j("minSize", b, a))
                });
        t.g(Q, "maxSize", Q.prototype.He);
        t.defineProperty(Q, {He: "maxSize"}, function() {
        return this.Ej
                }, function(a) {
        var b = this.Ej;
                b.M(a) || (e && t.l(a, ga, Q, "maxSize"), a = a.copy(), isNaN(a.width) && (a.width = Infinity), isNaN(a.height) && (a.height = Infinity), a.freeze(), this.Ej = a, this.fa(), this.j("maxSize", b, a))
                });
        t.A(Q, {Ea: "measuredBounds"}, function() {
        return this.Tc
                });
        t.A(Q, {Qa: "naturalBounds"}, function() {
        return this.gd
                }, {configurable: !0});
        t.g(Q, "margin", Q.prototype.margin);
        t.defineProperty(Q, {margin: "margin"}, function() {
        return this.rr
                }, function(a) {
        "number" === typeof a ? a = new ab(a) : e && t.l(a, ab, Q, "margin");
                var b = this.rr;
                b.M(a) || (this.rr = a = a.Z(), this.fa(), this.j("margin", b, a))
                });
        t.A(Q, {transform: null}, function() {
        0 !== (this.ma & 2048) === !0 && Ak(this);
                return this.ld
                });
        t.A(Q, {ke: null}, function() {
        0 !== (this.ma & 4096) === !0 && Ak(this);
                return this.jk
                });
        t.g(Q, "alignment", Q.prototype.alignment);
        t.defineProperty(Q, {alignment: "alignment"}, function() {
        return this.ue
                }, function(a) {
        var b = this.ue;
                b.M(a) || (e ? t.l(a, I, Q, "alignment") : a.Ge() && !a.Nc() && t.m("alignment must be a real Spot or Spot.Default"), this.ue = a = a.Z(), Dk(this), this.j("alignment", b, a))
                });
        t.g(Q, "column", Q.prototype.column);
        t.defineProperty(Q, {column: "column"}, function() {
        return this.sq
                }, function(a) {
        e && t.q(a, Q, "column");
                a = Math.round(a);
                var b = this.sq;
                b !== a && (0 > a && t.la(a, ">= 0", Q, "column"), this.sq = a, this.fa(), this.j("column", b, a))
                });
        t.g(Q, "columnSpan", Q.prototype.ZD);
        t.defineProperty(Q, {ZD: "columnSpan"}, function() {
        return this.rj
                }, function(a) {
        e && t.q(a, Q, "columnSpan");
                a = Math.round(a);
                var b = this.rj;
                b !== a && (1 > a && t.la(a, ">= 1", Q, "columnSpan"), this.rj = a, this.fa(), this.j("columnSpan", b, a))
                });
        t.g(Q, "row", Q.prototype.rc);
        t.defineProperty(Q, {rc: "row"}, function() {
        return this.$r
                }, function(a) {
        e && t.q(a, Q, "row");
                a = Math.round(a);
                var b = this.$r;
                b !== a && (0 > a && t.la(a, ">= 0", Q, "row"), this.$r = a, this.fa(), this.j("row", b, a))
                });
        t.g(Q, "rowSpan", Q.prototype.rowSpan);
        t.defineProperty(Q, {rowSpan: "rowSpan"}, function() {
        return this.Kj
                }, function(a) {
        e && t.q(a, Q, "rowSpan");
                a = Math.round(a);
                var b = this.Kj;
                b !== a && (1 > a && t.la(a, ">= 1", Q, "rowSpan"), this.Kj = a, this.fa(), this.j("rowSpan", b, a))
                });
        t.g(Q, "alignmentFocus", Q.prototype.Rj);
        t.defineProperty(Q, {Rj: "alignmentFocus"}, function() {
        return this.lq
                }, function(a) {
        var b = this.lq;
                b.M(a) || (e ? t.l(a, I, Q, "alignmentFocus") : a.Ge() && !a.Nc() && t.m("alignmentFocus must be a real Spot or Spot.Default"), this.lq = a = a.Z(), this.fa(), this.j("alignmentFocus", b, a))
                });
        t.g(Q, "portId", Q.prototype.Ld);
        t.defineProperty(Q, {Ld: "portId"}, function() {
        return this.Mr
                }, function(a) {
        var b = this.Mr;
                if (b !== a) {
        e && null !== a && t.i(a, "string", Q, "portId");
                var c = this.S;
                null === c || c instanceof S || (t.m("portID being set on a Link: " + a), c = null);
                null !== b && c && Mk(c, this);
                this.Mr = a;
                if (null !== a && c) {
        c.Eh = !0;
                null === c.Pd && Nk(c);
                var d = this.Ld;
                null !== d && c.Pd.add(d, this)
                }
        this.j("portId", b, a)
                }
        });
        function Ok(a) {
        var b = {value: null};
                Pk(a, b);
                return b.value
        }
function Pk(a, b) {
var c = a.ia;
        return null === c || !Pk(c, b) && a.visible ? (b.value = a, !1) : !0
        }
function Jk(a) {
var b = a.S;
        b instanceof S && (a = a.h) && !a.ja.sb && b.vf()
        }
t.g(Q, "toSpot", Q.prototype.tb);
        t.defineProperty(Q, {tb: "toSpot"}, function() {
        return null !== this.P ? this.P.Th : wb
                }, function(a) {
        null === this.P && this.Fe();
                var b = this.P.Th;
                b.M(a) || (e && t.l(a, I, Q, "toSpot"), a = a.Z(), this.P.Th = a, this.j("toSpot", b, a), Jk(this))
                });
        t.g(Q, "toEndSegmentLength", Q.prototype.ik);
        t.defineProperty(Q, {ik: "toEndSegmentLength"}, function() {
        return null !== this.P ? this.P.Qh : 10
                }, function(a) {
        null === this.P && this.Fe();
                var b = this.P.Qh;
                b !== a && (e && t.i(a, "number", Q, "toEndSegmentLength"), 0 > a && t.la(a, ">= 0", Q, "toEndSegmentLength"), this.P.Qh = a, this.j("toEndSegmentLength", b, a), Jk(this))
                });
        t.g(Q, "toEndSegmentDirection", Q.prototype.Wp);
        t.defineProperty(Q, {Wp: "toEndSegmentDirection"}, function() {
        return null !== this.P ? this.P.Ph : ek
                }, function(a) {
        null === this.P && this.Fe();
                var b = this.P.Ph;
                b !== a && (e && t.Aa(a, S, Q, "toEndSegmentDirection"), this.P.Ph = a, this.j("toEndSegmentDirection", b, a), Jk(this))
                });
        t.g(Q, "toShortLength", Q.prototype.Xp);
        t.defineProperty(Q, {Xp: "toShortLength"}, function() {
        return null !== this.P ? this.P.Sh : 0
                }, function(a) {
        null === this.P && this.Fe();
                var b = this.P.Sh;
                b !== a && (e && t.i(a, "number", Q, "toShortLength"), this.P.Sh = a, this.j("toShortLength", b, a), Jk(this))
                });
        t.g(Q, "toLinkable", Q.prototype.kB);
        t.defineProperty(Q, {kB: "toLinkable"}, function() {
        return this.ys
                }, function(a) {
        var b = this.ys;
                b !== a && (e && null !== a && t.i(a, "boolean", Q, "toLinkable"), this.ys = a, this.j("toLinkable", b, a))
                });
        t.g(Q, "toMaxLinks", Q.prototype.zG);
        t.defineProperty(Q, {zG: "toMaxLinks"}, function() {
        return this.zs
                }, function(a) {
        var b = this.zs;
                b !== a && (e && t.q(a, Q, "toMaxLinks"), 0 > a && t.la(a, ">= 0", Q, "toMaxLinks"), this.zs = a, this.j("toMaxLinks", b, a))
                });
        t.g(Q, "fromSpot", Q.prototype.pb);
        t.defineProperty(Q, {pb: "fromSpot"}, function() {
        return null !== this.P ? this.P.Dh : wb
                }, function(a) {
        null === this.P && this.Fe();
                var b = this.P.Dh;
                b.M(a) || (e && t.l(a, I, Q, "fromSpot"), a = a.Z(), this.P.Dh = a, this.j("fromSpot", b, a), Jk(this))
                });
        t.g(Q, "fromEndSegmentLength", Q.prototype.ck);
        t.defineProperty(Q, {ck: "fromEndSegmentLength"}, function() {
        return null !== this.P ? this.P.Ah : 10
                }, function(a) {
        null === this.P && this.Fe();
                var b = this.P.Ah;
                b !== a && (e && t.i(a, "number", Q, "fromEndSegmentLength"), 0 > a && t.la(a, ">= 0", Q, "fromEndSegmentLength"), this.P.Ah = a, this.j("fromEndSegmentLength", b, a), Jk(this))
                });
        t.g(Q, "fromEndSegmentDirection", Q.prototype.gp);
        t.defineProperty(Q, {gp: "fromEndSegmentDirection"}, function() {
        return null !== this.P ? this.P.zh : ek
                }, function(a) {
        null === this.P && this.Fe();
                var b = this.P.zh;
                b !== a && (e && t.Aa(a, S, Q, "fromEndSegmentDirection"), this.P.zh = a, this.j("fromEndSegmentDirection", b, a), Jk(this))
                });
        t.g(Q, "fromShortLength", Q.prototype.hp);
        t.defineProperty(Q, {hp: "fromShortLength"}, function() {
        return null !== this.P ? this.P.Ch : 0
                }, function(a) {
        null === this.P && this.Fe();
                var b = this.P.Ch;
                b !== a && (e && t.i(a, "number", Q, "fromShortLength"), this.P.Ch = a, this.j("fromShortLength", b, a), Jk(this))
                });
        t.g(Q, "fromLinkable", Q.prototype.hA);
        t.defineProperty(Q, {hA: "fromLinkable"}, function() {
        return this.Mq
                }, function(a) {
        var b = this.Mq;
                b !== a && (e && null !== a && t.i(a, "boolean", Q, "fromLinkable"), this.Mq = a, this.j("fromLinkable", b, a))
                });
        t.g(Q, "fromMaxLinks", Q.prototype.FE);
        t.defineProperty(Q, {FE: "fromMaxLinks"}, function() {
        return this.Nq
                }, function(a) {
        var b = this.Nq;
                b !== a && (e && t.q(a, Q, "fromMaxLinks"), 0 > a && t.la(a, ">= 0", Q, "fromMaxLinks"), this.Nq = a, this.j("fromMaxLinks", b, a))
                });
        t.g(Q, "cursor", Q.prototype.cursor);
        t.defineProperty(Q, {cursor: "cursor"}, function() {
        return this.zq
                }, function(a) {
        var b = this.zq;
                b !== a && (t.i(a, "string", Q, "cursor"), this.zq = a, this.j("cursor", b, a))
                });
        t.g(Q, "click", Q.prototype.click);
        t.defineProperty(Q, {click: "click"}, function() {
        return null !== this.Q ? this.Q.ni : null
                }, function(a) {
        null === this.Q && dk(this);
                var b = this.Q.ni;
                b !== a && (null !== a && t.i(a, "function", Q, "click"), this.Q.ni = a, this.j("click", b, a))
                });
        t.g(Q, "doubleClick", Q.prototype.Nm);
        t.defineProperty(Q, {Nm: "doubleClick"}, function() {
        return null !== this.Q ? this.Q.ti : null
                }, function(a) {
        null === this.Q && dk(this);
                var b = this.Q.ti;
                b !== a && (null !== a && t.i(a, "function", Q, "doubleClick"), this.Q.ti = a, this.j("doubleClick", b, a))
                });
        t.g(Q, "contextClick", Q.prototype.Vs);
        t.defineProperty(Q, {Vs: "contextClick"}, function() {
        return null !== this.Q ? this.Q.pi : null
                }, function(a) {
        null === this.Q && dk(this);
                var b = this.Q.pi;
                b !== a && (null !== a && t.i(a, "function", Q, "contextClick"), this.Q.pi = a, this.j("contextClick", b, a))
                });
        t.g(Q, "mouseEnter", Q.prototype.EA);
        t.defineProperty(Q, {EA: "mouseEnter"}, function() {
        return null !== this.Q ? this.Q.Cr : null
                }, function(a) {
        null === this.Q && dk(this);
                var b = this.Q.Cr;
                b !== a && (null !== a && t.i(a, "function", Q, "mouseEnter"), this.Q.Cr = a, this.j("mouseEnter", b, a))
                });
        t.g(Q, "mouseLeave", Q.prototype.FA);
        t.defineProperty(Q, {FA: "mouseLeave"}, function() {
        return null !== this.Q ? this.Q.Dr : null
                }, function(a) {
        null === this.Q && dk(this);
                var b = this.Q.Dr;
                b !== a && (null !== a && t.i(a, "function", Q, "mouseLeave"), this.Q.Dr = a, this.j("mouseLeave", b, a))
                });
        t.g(Q, "mouseOver", Q.prototype.yt);
        t.defineProperty(Q, {yt: "mouseOver"}, function() {
        return null !== this.Q ? this.Q.Di : null
                }, function(a) {
        null === this.Q && dk(this);
                var b = this.Q.Di;
                b !== a && (null !== a && t.i(a, "function", Q, "mouseOver"), this.Q.Di = a, this.j("mouseOver", b, a))
                });
        t.g(Q, "mouseHover", Q.prototype.xt);
        t.defineProperty(Q, {xt: "mouseHover"}, function() {
        return null !== this.Q ? this.Q.Ci : null
                }, function(a) {
        null === this.Q && dk(this);
                var b = this.Q.Ci;
                b !== a && (null !== a && t.i(a, "function", Q, "mouseHover"), this.Q.Ci = a, this.j("mouseHover", b, a))
                });
        t.g(Q, "mouseHold", Q.prototype.wt);
        t.defineProperty(Q, {wt: "mouseHold"}, function() {
        return null !== this.Q ? this.Q.Bi : null
                }, function(a) {
        null === this.Q && dk(this);
                var b = this.Q.Bi;
                b !== a && (null !== a && t.i(a, "function", Q, "mouseHold"), this.Q.Bi = a, this.j("mouseHold", b, a))
                });
        t.g(Q, "mouseDragEnter", Q.prototype.zF);
        t.defineProperty(Q, {zF: "mouseDragEnter"}, function() {
        return null !== this.Q ? this.Q.Ar : null
                }, function(a) {
        null === this.Q && dk(this);
                var b = this.Q.Ar;
                b !== a && (null !== a && t.i(a, "function", Q, "mouseDragEnter"), this.Q.Ar = a, this.j("mouseDragEnter", b, a))
                });
        t.g(Q, "mouseDragLeave", Q.prototype.DA);
        t.defineProperty(Q, {DA: "mouseDragLeave"}, function() {
        return null !== this.Q ? this.Q.Br : null
                }, function(a) {
        null === this.Q && dk(this);
                var b = this.Q.Br;
                b !== a && (null !== a && t.i(a, "function", Q, "mouseDragLeave"), this.Q.Br = a, this.j("mouseDragLeave", b, a))
                });
        t.g(Q, "mouseDrop", Q.prototype.vt);
        t.defineProperty(Q, {vt: "mouseDrop"}, function() {
        return null !== this.Q ? this.Q.Ai : null
                }, function(a) {
        null === this.Q && dk(this);
                var b = this.Q.Ai;
                b !== a && (null !== a && t.i(a, "function", Q, "mouseDrop"), this.Q.Ai = a, this.j("mouseDrop", b, a))
                });
        t.g(Q, "actionDown", Q.prototype.Fz);
        t.defineProperty(Q, {Fz: "actionDown"}, function() {
        return null !== this.Q ? this.Q.hq : null
                }, function(a) {
        null === this.Q && dk(this);
                var b = this.Q.hq;
                b !== a && (null !== a && t.i(a, "function", Q, "actionDown"), this.Q.hq = a, this.j("actionDown", b, a))
                });
        t.g(Q, "actionUp", Q.prototype.Hz);
        t.defineProperty(Q, {Hz: "actionUp"}, function() {
        return null !== this.Q ? this.Q.jq : null
                }, function(a) {
        null === this.Q && dk(this);
                var b = this.Q.jq;
                b !== a && (null !== a && t.i(a, "function", Q, "actionUp"), this.Q.jq = a, this.j("actionUp", b, a))
                });
        t.g(Q, "actionMove", Q.prototype.Gz);
        t.defineProperty(Q, {Gz: "actionMove"}, function() {
        return null !== this.Q ? this.Q.iq : null
                }, function(a) {
        null === this.Q && dk(this);
                var b = this.Q.iq;
                b !== a && (null !== a && t.i(a, "function", Q, "actionMove"), this.Q.iq = a, this.j("actionMove", b, a))
                });
        t.g(Q, "actionCancel", Q.prototype.Ez);
        t.defineProperty(Q, {Ez: "actionCancel"}, function() {
        return null !== this.Q ? this.Q.gq : null
                }, function(a) {
        null === this.Q && dk(this);
                var b = this.Q.gq;
                b !== a && (null !== a && t.i(a, "function", Q, "actionCancel"), this.Q.gq = a, this.j("actionCancel", b, a))
                });
        t.g(Q, "toolTip", Q.prototype.Vt);
        t.defineProperty(Q, {Vt: "toolTip"}, function() {
        return null !== this.Q ? this.Q.Ni : null
                }, function(a) {
        null === this.Q && dk(this);
                var b = this.Q.Ni;
                b !== a && (null !== a && t.l(a, Ke, Q, "toolTip"), this.Q.Ni = a, this.j("toolTip", b, a))
                });
        t.g(Q, "contextMenu", Q.prototype.contextMenu);
        t.defineProperty(Q, {contextMenu: "contextMenu"}, function() {
        return null !== this.Q ? this.Q.qi : null
                }, function(a) {
        null === this.Q && dk(this);
                var b = this.Q.qi;
                b !== a && (null !== a && t.l(a, Ke, Q, "contextMenu"), this.Q.qi = a, this.j("contextMenu", b, a))
                });
        Q.prototype.bind = Q.prototype.bind = function(a) {
        a.mg = this;
                var b = this.dp();
                null !== b && Qk(b) && t.m("Cannot add a Binding to a template that has already been copied: " + a);
                null === this.Ic && (this.Ic = new B(Ee));
                this.Ic.add(a)
                };
        Q.prototype.findTemplateBinder = Q.prototype.dp = function() {
        for (var a = this instanceof y ? this : this.ia; null !== a; ) {
        if (null !== a.Hl && a instanceof y)
                return a;
                a = a.ia
                }
        return null
                };
        Q.fromSvg = Q.fromSVG = function(a) {
        return Rk(a)
                };
        Q.prototype.setProperties = function(a) {
        t.px(this, a)
                };
        var Sk;
        Q.make = Sk = function(a, b) {
        var c = arguments, d = null, f = null;
                if ("function" === typeof a)
                f = a;
                else if ("string" === typeof a) {
        var g = Tk.za(a);
                "function" === typeof g ? (c = Array.prototype.slice.call(arguments), d = g(c)) : f = ca[a]
                }
        null === d && (void 0 === f && (d = window.$, void 0 !== d && void 0 !== d.noop && t.m("GraphObject.make failed to complete. Is it conflicting with another $ var? (such as jQuery)"), t.m("GraphObject.make failed to complete, it may be conflicting with another var.")), null !== f && f.constructor || t.m("GraphObject.make requires a class function or class name, not: " +
                a), d = new f);
                g = 1;
                d instanceof z && 1 < c.length && (f = c[1], "string" === typeof f || f instanceof HTMLDivElement) && (d.$i = null, bi(d, f), g++);
                for (; g < c.length; g++)
                f = c[g], void 0 === f ? t.m("Undefined value at argument " + g + " for object being constructed by GraphObject.make: " + d) : Uk(d, f);
                return d
                };
        function Uk(a, b) {
        if ("string" === typeof b) {
        var c = a;
                if (c instanceof na)
                c.text = b;
                else if (c instanceof W)
                c.zb = b;
                else if (c instanceof Vk)
                c.source = b;
                else if (c instanceof y) {
        var d = t.Om(y, b);
                null !== d ? c.type = d : t.m("Unknown Panel type as an argument to GraphObject.make: " + b)
        } else
                c instanceof fa ? (d = t.Om(fa, b), null !== d ? c.type = d : t.m("Unknown Brush type as an argument to GraphObject.make: " + b)) : c instanceof zc ? (d = t.Om(zc, b), null !== d ? c.type = d : t.m("Unknown Geometry type as an argument to GraphObject.make: " + b)) :
                c instanceof id ? (d = t.Om(id, b), null !== d ? c.type = d : t.m("Unknown PathSegment type as an argument to GraphObject.make: " + b)) : t.m("Unable to use a string as an argument to GraphObject.make: " + b)
        } else if (b instanceof Q)
                a instanceof y || t.m("A GraphObject can only be added to a Panel, not to: " + a), a.add(b);
                else if (b instanceof Be)
                a instanceof y || t.m("A RowColumnDefinition can only be added to a Panel, not to: " + a), c = b.ci ? a.pe(b.index) : a.oe(b.index), t.l(b, Be, Be, "copyFrom:pd"), b.ci ? c.height = b.height : c.width =
                b.width, c.ei = b.ei, c.xf = b.xf, c.alignment = b.alignment, c.Pt = b.Pt, c.Nj = null === b.Nj ? null : b.Nj.Z(), c.hn = b.hn, c.jn = b.jn, c.Kh = null, b.Kh && (c.Kh = b.Kh.slice(0)), c.background = b.background, c.pw = b.pw, c.Ic = b.Ic;
                else if (b instanceof da)
                c = a, c instanceof V && b.Re === V ? 2 === (b.value & 2) ? c.Jt = b : b === Pg || b === yg || b === xg ? c.De = b : b === Wk || b === Xk || b === Yk ? c.Lo = b : b !== Zk && b !== zg && t.m("Unknown Link enum value for a Link property: " + b) : c instanceof y && b.Re === y ? c.type = b : c instanceof na && b.Re === na ? c.qB = b : c instanceof Q && b.Re === V ? 0 === b.name.indexOf("Orient") ?
                c.Lt = b : t.m("Unknown Link enum value for GraphObject.segmentOrientation property: " + b) : c instanceof Q && b.Re === Q ? c.gi = b : c instanceof z && b.Re === z ? c.Cm = b : c instanceof fa && b.Re === fa ? c.type = b : c instanceof zc && b.Re === zc ? c.type = b : c instanceof id && b.Re === id ? c.type = b : c instanceof Ee && b.Re === Ee ? c.mode = b : c instanceof td && b.Re === td ? c.td = b : c instanceof X && b.Re === X ? 0 === b.name.indexOf("Alignment") ? c.alignment = b : 0 === b.name.indexOf("Arrangement") ? c.Qe = b : 0 === b.name.indexOf("Compaction") ? c.compaction = b : 0 === b.name.indexOf("Path") ?
                c.path = b : 0 === b.name.indexOf("Sorting") ? c.sorting = b : 0 === b.name.indexOf("Style") ? c.JG = b : t.m("Unknown enum value: " + b) : c instanceof Z && b.Re === Z ? 0 === b.name.indexOf("Aggressive") ? c.JD = b : 0 === b.name.indexOf("Cycle") ? c.hE = b : 0 === b.name.indexOf("Init") ? c.YE = b : 0 === b.name.indexOf("Layer") ? c.kF = b : t.m("Unknown enum value: " + b) : c instanceof Xj && b.Re === Xj ? b === $k || b === al || b === bl || b === cl ? c.sorting = b : b === dl || b === el ? c.Qe = b : b === fl || b === gl ? c.alignment = b : t.m("Unknown enum value: " + b) : c instanceof hl && b.Re === hl ? b === il ||
                b === jl || b === kl || b === ll || b === ml ? c.sorting = b : b === nl || b === ol || b === pl || b === ql ? c.direction = b : b === rl || b === xl || b === yl || b === zl ? c.Qe = b : b === Al || b === Bl ? c.At = b : t.m("Unknown enum value: " + b) : t.m("No property to set for this enum value: " + b);
                else if (b instanceof Ee)
                if (a instanceof Q || a instanceof Be) {
        var d = b.Tt, f = d.indexOf(".");
                0 < f && a instanceof y && (c = d.substr(f + 1), d = a.me(d.substring(0, f)), null !== d && (a = d, b.Tt = c));
                a.bind(b)
        } else
                t.m("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: " +
                        a);
                else if (b instanceof Bc)
                a instanceof zc ? a.Ab.add(b) : t.m("A PathFigure can only be added to a Geometry, not to: " + a);
                else if (b instanceof id)
                a instanceof Bc ? a.Fa.add(b) : t.m("A PathSegment can only be added to a PathFigure, not to: " + a);
                else if (Array.isArray(b))
                for (c = 0; c < b.length; c++)
                Uk(a, b[c]);
                else if ("object" === typeof b && null !== b)
                if (c = a, c instanceof fa) {
        d = {};
                for (f in b) {
        var g = parseFloat(f);
                isNaN(g) ? d[f] = b[f] : c.addColorStop(g, b[f])
        }
        t.px(c, d)
        } else
                c instanceof Be ? (void 0 !== b.row ? (d = b.row, (void 0 ===
                        d || null === d || Infinity === d || isNaN(d) || 0 > d) && t.m("Must specify non-negative integer row for RowColumnDefinition " + b), c.Ul = !0, c.Sc = d) : void 0 !== b.column ? (d = b.column, (void 0 === d || null === d || Infinity === d || isNaN(d) || 0 > d) && t.m("Must specify non-negative integer column for RowColumnDefinition " + b), c.Ul = !1, c.Sc = d) : t.m("Must specify row or column value in a RowColumnDefinition " + b), d = t.eI(b, "row", "column"), t.px(c, d)) : t.px(c, b);
                else
                t.m('Unknown initializer "' + b + '" for object being constructed by GraphObject.make: ' +
                        a)
        }
var Tk;
        Q.Builders = Tk = new ja("string", "function");
        Tk.add("Button", function() {
        var a = new fa(Zd);
                a.addColorStop(0, "white");
                a.addColorStop(1, "lightgray");
                var b = new fa(Zd);
                b.addColorStop(0, "white");
                b.addColorStop(1, "dodgerblue");
                var c = Sk(y, di, {Lw: !0}, Sk(W, {name: "ButtonBorder", zb: "RoundedRectangle", fill: a, stroke: "gray"}));
                c.EA = function(a, c) {
                var g = c.wa(0), h = c._buttonFillOver;
                        void 0 === h && (h = b);
                        c._buttonFillNormal = g.fill;
                        g.fill = h;
                        h = c._buttonStrokeOver;
                        void 0 === h && (h = "blue");
                        c._buttonStrokeNormal = g.stroke;
                        g.stroke = h
                        };
                c.FA = function(b, c) {
                var g = c.wa(0), h = c._buttonFillNormal;
                        void 0 === h && (h = a);
                        g.fill = h;
                        h = c._buttonStrokeNormal;
                        void 0 === h && (h = "gray");
                        g.stroke = h
                        };
                return c
                });
        Tk.add("TreeExpanderButton", function() {
        var a = Sk("Button", Sk(W, {name: "ButtonIcon", zb: "MinusLine", Ca: H.cq}, (new Ee("figure", "isTreeExpanded", function(a, c) {
        var d = null, f = c.ia;
                f && (d = a ? f._treeExpandedFigure : f._treeCollapsedFigure);
                d || (d = a ? "MinusLine" : "PlusLine");
                return d
                })).KA("")), {visible: !1}, (new Ee("visible", "isTreeLeaf", function(a) {
        return!a
                })).KA(""));
                a.click = function(a, c) {
                var d = c.S;
                        d instanceof Ke && (d = d.Wh);
                        if (d instanceof S) {
                var f = d.h;
                        if (null !== f) {
                f = f.Se;
                        if (d.Oc) {
                if (!f.canCollapseTree(d))
                        return
                        } else if (!f.canExpandTree(d))
                        return;
                        a.Ee = !0;
                        d.Oc ? f.collapseTree(d) : f.expandTree(d)
                        }
                }
                };
                return a
                });
        Tk.add("SubGraphExpanderButton", function() {
        var a = Sk("Button", Sk(W, {name: "ButtonIcon", zb: "MinusLine", Ca: H.cq}, (new Ee("figure", "isSubGraphExpanded", function(a, c) {
        var d = null, f = c.ia;
                f && (d = a ? f._subGraphExpandedFigure : f._subGraphCollapsedFigure);
                d || (d = a ? "MinusLine" : "PlusLine");
                return d
                })).KA("")));
                a.click = function(a, c) {
                var d = c.S;
                        d instanceof Ke && (d = d.Wh);
                        if (d instanceof T) {
                var f = d.h;
                        if (null !== f) {
                f = f.Se;
                        if (d.qe) {
                if (!f.canCollapseSubGraph(d))
                        return
                        } else if (!f.canExpandSubGraph(d))
                        return;
                        a.Ee = !0;
                        d.qe ? f.collapseSubGraph(d) :
                        f.expandSubGraph(d)
                        }
                }
                };
                return a
                });
        Tk.add("ContextMenuButton", function() {
        var a = Sk("Button");
                a.gi = ck;
                var b = a.me("ButtonBorder");
                b instanceof W && (b.zb = "Rectangle", b.G = new I(0, 0, 2, 2), b.H = new I(1, 1, - 2, - 2));
                return a
                });
        Q.defineBuilder = function(a, b) {
        t.i(a, "string", Q, "defineBuilder:name");
                t.i(b, "function", Q, "defineBuilder:func");
                var c = a.toLowerCase();
                "" !== a && "none" !== c && a !== c || t.m("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: " + a);
                Q.Builders.add(a, b)
                };
        function y(a) {
        Q.call(this);
                void 0 === a ? 0 === arguments.length ? this.da = $g : t.m("invalid argument to Panel constructor: undefined") : (t.Aa(a, y, y, "type"), this.da = a);
                this.xa = new B(Q);
                this.Ne = H.eq;
                this.Tg = !1;
                this.da === xi && (this.Tg = !0);
                this.Cq = xb;
                this.wc = Wg;
                this.da === Hk && Cl(this);
                this.Io = Xg;
                this.Rq = (new ga(10, 10)).freeze();
                this.Sq = H.mj;
                this.Hl = this.Ml = null;
                this.gr = NaN;
                this.eg = this.yi = null;
                this.fo = "category";
                this.dg = null;
                this.Pi = new x(NaN, NaN, NaN, NaN);
                this.Eo = null;
                this.Eh = !1;
                this.as = null
        }
t.ga("Panel", y);
        t.Xh(y);
        t.Ka(y, Q);
        function Cl(a) {
        a.sj = H.eq;
                a.wh = 1;
                a.si = null;
                a.Ol = null;
                a.vh = 1;
                a.uh = null;
                a.Nl = null;
                a.jd = [];
                a.cd = [];
                a.pm = Dl;
                a.Jl = Dl;
                a.Oi = 0;
                a.zi = 0
        }
y.prototype.cloneProtected = function(a) {
Q.prototype.cloneProtected.call(this, a);
        a.da = this.da;
        a.Ne = this.Ne.Z();
        a.Tg = this.Tg;
        a.Cq = this.Cq.Z();
        a.wc = this.wc;
        if (a.da === Hk) {
a.sj = this.sj.Z();
        a.wh = this.wh;
        a.si = this.si;
        a.Ol = this.Ol;
        a.vh = this.vh;
        a.uh = this.uh;
        a.Nl = this.Nl;
        var b = [];
        if (0 < this.jd.length)
        for (var c = this.jd, d = c.length, f = 0; f < d; f++)
        if (void 0 !== c[f]) {
var g = c[f].copy();
        g.wl(a);
        b[f] = g
        }
a.jd = b;
        b = [];
        if (0 < this.cd.length)
        for (c = this.cd, d = c.length, f = 0; f < d; f++)
        void 0 !== c[f] && (g = c[f].copy(), g.wl(a), b[f] = g);
        a.cd =
        b;
        a.pm = this.pm;
        a.Jl = this.Jl;
        a.Oi = this.Oi;
        a.zi = this.zi
        }
a.Io = this.Io;
        a.Rq.assign(this.Rq);
        a.Sq = this.Sq.Z();
        a.Ml = this.Ml;
        a.Hl = this.Hl;
        a.gr = this.gr;
        a.yi = this.yi;
        a.eg = this.eg;
        a.fo = this.fo;
        a.Pi.assign(this.Pi);
        a.Eh = this.Eh;
        this.as && (a.as = this.as);
        this._buttonFillNormal && (a._buttonFillNormal = this._buttonFillNormal);
        this._buttonFillOver && (a._buttonFillOver = this._buttonFillOver);
        this._buttonStrokeNormal && (a._buttonStrokeNormal = this._buttonStrokeNormal);
        this._buttonStrokeOver && (a._buttonStrokeOver = this._buttonStrokeOver);
        this._treeExpandedFigure && (a._treeExpandedFigure = this._treeExpandedFigure);
        this._treeCollapsedFigure && (a._treeCollapsedFigure = this._treeCollapsedFigure);
        this._subGraphExpandedFigure && (a._subGraphExpandedFigure = this._subGraphExpandedFigure);
        this._subGraphCollapsedFigure && (a._subGraphCollapsedFigure = this._subGraphCollapsedFigure)
        };
        y.prototype.Yh = function(a) {
        Q.prototype.Yh.call(this, a);
                a.xa = this.xa;
                for (var b = a.xa.k; b.next(); )
                b.value.Hi = a
                };
        y.prototype.copy = function() {
        var a = Q.prototype.copy.call(this);
                if (a instanceof y) {
        var b = this.xa;
                if (0 < b.length)
                for (var c = b.length, d = 0; d < c; d++) {
        var f = b.n[d].copy(), g = a;
                f.wl(g);
                f.km = null;
                var h = g.xa, k = h.count;
                h.Gd(k, f);
                h = g.S;
                if (null !== h) {
        h.Gj = null;
                null !== f.Ld && h instanceof S && (h.Eh = !0);
                var l = g.h;
                null !== l && l.ja.sb || h.Zc(wd, "elements", g, null, f, null, k)
                }
        }
        return a
                }
        return null
                };
        y.prototype.toString = function() {
        return"Panel(" + this.type + ")#" + t.od(this)
                };
        var $g;
        y.Position = $g = t.w(y, "Position", 0);
        y.Horizontal = t.w(y, "Horizontal", 1);
        var ci;
        y.Vertical = ci = t.w(y, "Vertical", 2);
        var Tg;
        y.Spot = Tg = t.w(y, "Spot", 3);
        var di;
        y.Auto = di = t.w(y, "Auto", 4);
        var Hk;
        y.Table = Hk = t.w(y, "Table", 5);
        y.Viewbox = t.w(y, "Viewbox", 6);
        var tk;
        y.TableRow = tk = t.w(y, "TableRow", 7);
        var uk;
        y.TableColumn = uk = t.w(y, "TableColumn", 8);
        var wg;
        y.Link = wg = t.w(y, "Link", 9);
        var xi;
        y.Grid = xi = t.w(y, "Grid", 10);
        t.g(y, "type", y.prototype.type);
        t.defineProperty(y, {type: "type"}, function() {
        return this.da
                }, function(a) {
        var b = this.da;
                b !== a && (e && t.Aa(a, y, y, "type"), b !== tk && b !== uk || t.m("Cannot change Panel.type when it is already a TableRow or a TableColumn: " + a), this.da = a, this.da === xi ? this.Tg = !0 : this.da === Hk && Cl(this), this.fa(), this.j("type", b, a))
                });
        t.A(y, {elements: "elements"}, function() {
        return this.xa.k
                });
        t.A(y, {Qa: "naturalBounds"}, function() {
        return this.gd
                });
        t.g(y, "padding", y.prototype.padding);
        t.defineProperty(y, {padding: "padding"}, function() {
        return this.Ne
                }, function(a) {
        "number" === typeof a ? (0 > a && t.la(a, ">= 0", y, "padding"), a = new ab(a)) : (t.l(a, ab, y, "padding"), 0 > a.left && t.la(a.left, ">= 0", y, "padding:val.left"), 0 > a.right && t.la(a.right, ">= 0", y, "padding:val.right"), 0 > a.top && t.la(a.top, ">= 0", y, "padding:val.top"), 0 > a.bottom && t.la(a.bottom, ">= 0", y, "padding:val.bottom"));
                var b = this.Ne;
                b.M(a) || (this.Ne = a = a.Z(), this.fa(), this.j("padding", b, a))
                });
        t.g(y, "defaultAlignment", y.prototype.Xj);
        t.defineProperty(y, {Xj: "defaultAlignment"}, function() {
        return this.Cq
                }, function(a) {
        var b = this.Cq;
                b.M(a) || (e && t.l(a, I, y, "defaultAlignment"), this.Cq = a = a.Z(), this.fa(), this.j("defaultAlignment", b, a))
                });
        t.g(y, "defaultStretch", y.prototype.Zz);
        t.defineProperty(y, {Zz: "defaultStretch"}, function() {
        return this.wc
                }, function(a) {
        var b = this.wc;
                b !== a && (t.Aa(a, Q, y, "defaultStretch"), this.wc = a, this.fa(), this.j("defaultStretch", b, a))
                });
        t.g(y, "defaultSeparatorPadding", y.prototype.sI);
        t.defineProperty(y, {sI: "defaultSeparatorPadding"}, function() {
        return void 0 === this.sj ? H.eq : this.sj
                }, function(a) {
        if (void 0 !== this.sj) {
        "number" === typeof a ? a = new ab(a) : e && t.l(a, ab, y, "defaultSeparatorPadding");
                var b = this.sj;
                b.M(a) || (this.sj = a = a.Z(), this.j("defaultSeparatorPadding", b, a))
                }
        });
        t.g(y, "defaultRowSeparatorStroke", y.prototype.qI);
        t.defineProperty(y, {qI: "defaultRowSeparatorStroke"}, function() {
        return void 0 === this.si ? null : this.si
                }, function(a) {
        var b = this.si;
                b !== a && (null === a || "string" === typeof a || a instanceof fa) && (a instanceof fa && a.freeze(), this.si = a, this.j("defaultRowSeparatorStroke", b, a))
                });
        t.g(y, "defaultRowSeparatorStrokeWidth", y.prototype.rI);
        t.defineProperty(y, {rI: "defaultRowSeparatorStrokeWidth"}, function() {
        return void 0 === this.wh ? 1 : this.wh
                }, function(a) {
        if (void 0 !== this.wh) {
        var b = this.wh;
                b !== a && (this.wh = a, this.j("defaultRowSeparatorStrokeWidth", b, a))
                }
        });
        t.g(y, "defaultRowSeparatorDashArray", y.prototype.pI);
        t.defineProperty(y, {pI: "defaultRowSeparatorDashArray"}, function() {
        return void 0 === this.Ol ? null : this.Ol
                }, function(a) {
        if (void 0 !== this.Ol) {
        var b = this.Ol;
                b !== a && (Array.isArray(a) || t.bc(a, "Array", y, "defaultRowSeparatorDashArray:val"), this.Ol = a, this.j("defaultRowSeparatorDashArray", b, a))
                }
        });
        t.g(y, "defaultColumnSeparatorStroke", y.prototype.kI);
        t.defineProperty(y, {kI: "defaultColumnSeparatorStroke"}, function() {
        return void 0 === this.uh ? null : this.uh
                }, function(a) {
        if (void 0 !== this.uh) {
        var b = this.uh;
                b !== a && (null === a || "string" === typeof a || a instanceof fa) && (a instanceof fa && a.freeze(), this.uh = a, this.j("defaultColumnSeparatorStroke", b, a))
                }
        });
        t.g(y, "defaultColumnSeparatorStrokeWidth", y.prototype.lI);
        t.defineProperty(y, {lI: "defaultColumnSeparatorStrokeWidth"}, function() {
        return void 0 === this.vh ? 1 : this.vh
                }, function(a) {
        if (void 0 !== this.vh) {
        var b = this.vh;
                b !== a && (this.vh = a, this.j("defaultColumnSeparatorStrokeWidth", b, a))
                }
        });
        t.g(y, "defaultColumnSeparatorDashArray", y.prototype.jI);
        t.defineProperty(y, {jI: "defaultColumnSeparatorDashArray"}, function() {
        return void 0 === this.Nl ? null : this.Nl
                }, function(a) {
        if (void 0 !== this.Nl) {
        var b = this.Nl;
                b !== a && (Array.isArray(a) || t.bc(a, "Array", y, "defaultColumnSeparatorDashArray:val"), this.Nl = a, this.j("defaultColumnSeparatorDashArray", b, a))
                }
        });
        t.g(y, "viewboxStretch", y.prototype.aK);
        t.defineProperty(y, {aK: "viewboxStretch"}, function() {
        return this.Io
                }, function(a) {
        var b = this.Io;
                b !== a && (t.Aa(a, Q, y, "viewboxStretch"), this.Io = a, this.j("viewboxStretch", b, a))
                });
        t.g(y, "gridCellSize", y.prototype.gt);
        t.defineProperty(y, {gt: "gridCellSize"}, function() {
        return this.Rq
                }, function(a) {
        var b = this.Rq;
                b.M(a) || (t.l(a, ga, y, "gridCellSize"), a.N() && 0 !== a.width && 0 !== a.height || t.m("Invalid Panel.gridCellSize: " + a), this.Rq = a.Z(), null !== this.h && this === this.h.kp && Ki(this.h), this.ka(), this.j("gridCellSize", b, a))
                });
        t.g(y, "gridOrigin", y.prototype.kA);
        t.defineProperty(y, {kA: "gridOrigin"}, function() {
        return this.Sq
                }, function(a) {
        var b = this.Sq;
                b.M(a) || (t.l(a, w, y, "gridOrigin"), a.N() || t.m("Invalid Panel.gridOrigin: " + a), this.Sq = a.Z(), this.h && Ki(this.h), this.ka(), this.j("gridOrigin", b, a))
                });
        y.prototype.el = function(a, b) {
        if (this.da === xi) {
        var c = this.dk() * b.scale;
                0 >= c && (c = 1);
                var d = this.gt, f = d.width, d = d.height, g = this.Qa, h = g.width, g = g.height, k = Math.ceil(h / f), l = Math.ceil(g / d), m = this.kA;
                a.save();
                a.beginPath();
                a.rect(0, 0, h, g);
                a.clip();
                for (var n = [], p = this.xa.n, q = this.xa.length, r = 0; r < q; r++) {
        var s = [];
                n.push(s);
                var u = p[r];
                if (u.visible)
                for (var u = hj(u.zb), v = r + 1; v < q; v++) {
        var D = p[v];
                D.visible && hj(D.zb) === u && (D = D.interval, 2 <= D && s.push(D))
                }
        }
        p = this.xa.length;
                for (q = 0; q < p; q++) {
        var A = this.xa.n[q];
                if (A.visible) {
        var r =
                n[q], s = A.interval, u = !1, G = A.wx;
                if (null !== G) {
        var L = u = !0;
                void 0 !== a.setLineDash ? (a.setLineDash(G), a.lineDashOffset = A.kd) : void 0 !== a.webkitLineDash ? (a.webkitLineDash = G, a.webkitLineDashOffset = A.kd) : void 0 !== a.mozDash ? (a.mozDash = G, a.mozDashOffset = A.kd) : L = !1
                }
        if ("LineV" === A.zb) {
        a.lineWidth = A.fb;
                xk(this, a, A.stroke, !1);
                a.beginPath();
                for (D = v = Math.floor( - m.x / f); D <= v + k; D++) {
        var N = D * f + m.x;
                if (0 <= N && N < h && El(D, s, r) && (u && !L ? fk(a, N, 0, N, g, G, A.kd) : (a.moveTo(N, 0), a.lineTo(N, g)), 2 > f * s * c))
                break
                }
        a.stroke()
                } else if ("LineH" ===
                A.zb) {
        a.lineWidth = A.fb;
                xk(this, a, A.stroke, !1);
                a.beginPath();
                for (D = v = Math.floor( - m.y / d); D <= v + l && !(N = D * d + m.y, 0 <= N && N <= g && El(D, s, r) && (u && !L?fk(a, 0, N, h, N, G, A.kd):(a.moveTo(0, N), a.lineTo(h, N)), 2 > d * s * c)); D++)
                ;
                a.stroke()
                } else if ("BarV" === A.zb)
                for (xk(this, a, A.fill, !0), A = A.width, isNaN(A) && (A = f), D = v = Math.floor( - m.x / f); D <= v + k && !(N = D * f + m.x, 0 <= N && N < h && El(D, s, r) && (a.fillRect(N, 0, A, g), 2 > f * s * c)); D++)
                ;
                else if ("BarH" === A.zb)
                for (xk(this, a, A.fill, !0), A = A.height, isNaN(A) && (A = d), D = v = Math.floor( - m.y / d); D <= v + l && !(N = D * d +
                        m.y, 0 <= N && N <= g && El(D, s, r) && (a.fillRect(0, N, h, A), 2 > d * s * c)); D++)
                ;
                u && (void 0 !== a.setLineDash ? (a.setLineDash(t.ji), a.lineDashOffset = 0) : void 0 !== a.webkitLineDash ? (a.webkitLineDash = t.ji, a.webkitLineDashOffset = 0) : void 0 !== a.mozDash && (a.mozDash = null, a.mozDashOffset = 0))
                }
        }
        a.restore();
                vi(b, a, !1)
                } else {
        this.da === Hk && (a.lineCap = "butt", Fl(this, a, !0, this.jd, !0), Fl(this, a, !1, this.cd, !0), Gl(this, a, !0, this.jd), Gl(this, a, !1, this.cd), Fl(this, a, !0, this.jd, !1), Fl(this, a, !1, this.cd, !1));
                c = this.xa.length;
                for (f = 0; f < c; f++)
                this.xa.n[f].Ue(a,
                b);
                e && e.rK && this instanceof V && e.qK(a, b, this)
                }
        };
        function Gl(a, b, c, d) {
        for (var f = d.length, g, h = a.pa, k = c ? a.pe(0) : a.oe(0), l = 0; l < f; l++)
                if (g = d[l], void 0 !== g && g !== k && 0 !== g.fc) {
        var m = g.jn;
                isNaN(m) && (m = c ? a.wh : a.vh);
                var n = g.hn;
                null === n && (n = c ? a.si : a.uh);
                if (0 !== m && null !== n) {
        xk(a, b, n, !1);
                var n = !1, p = g.hG;
                if (null !== p) {
        var q = n = !0;
                void 0 !== b.setLineDash ? (b.setLineDash(p), b.lineDashOffset = a.kd) : void 0 !== b.webkitLineDash ? (b.webkitLineDash = p, b.webkitLineDashOffset = a.kd) : void 0 !== b.mozDash ? (b.mozDash = p, b.mozDashOffset = a.kd) : q = !1
        }
        b.beginPath();
                var r = g.position + m;
                c ? r >
                h.height && (m -= r - h.height) : r > h.width && (m -= r - h.width);
                g = g.position + m / 2;
                b.lineWidth = m;
                r = a.padding;
                c ? (g += r.top, m = r.left, r = h.width - r.right, n && !q ? fk(b, m, g, r, g, p, 0) : (b.moveTo(m, g), b.lineTo(r, g))) : (g += r.left, m = r.top, r = h.height - r.bottom, n && !q ? fk(b, g, m, g, r, p, 0) : (b.moveTo(g, m), b.lineTo(g, r)));
                b.stroke();
                n && (void 0 !== b.setLineDash ? (b.setLineDash(t.ji), b.lineDashOffset = 0) : void 0 !== b.webkitLineDash ? (b.webkitLineDash = t.ji, b.webkitLineDashOffset = 0) : void 0 !== b.mozDash && (b.mozDash = null, b.mozDashOffset = 0))
        }
        }
        }
function Fl(a, b, c, d, f) {
for (var g = d.length, h, k = a.pa, l = 0; l < g; l++)
        if (h = d[l], void 0 !== h && null !== h.background && h.pw !== f && 0 !== h.fc) {
var m = c ? k.height : k.width;
        if (!(h.position > m)) {
var n = Hl(h), p = h.jn;
        isNaN(p) && (p = c ? a.wh : a.vh);
        var q = h.hn;
        null === q && (q = c ? a.si : a.uh);
        null === q && (p = 0);
        n -= p;
        p = h.position + p;
        n += h.fc;
        p + n > m && (n = m - p);
        0 >= n || (m = a.padding, xk(a, b, h.background, !0), c ? b.fillRect(m.left, p + m.top, k.width - (m.left + m.right), n) : b.fillRect(p + m.left, m.top, n, k.height - (m.top + m.bottom)))
        }
}
}
function El(a, b, c) {
if (0 !== a % b)
        return!1;
        b = c.length;
        for (var d = 0; d < b; d++)
        if (0 === a % c[d])
        return!1;
        return!0
        }
function hj(a) {
return"LineV" === a || "BarV" === a
        }
y.prototype.jp = function(a, b, c, d, f) {
var g = this.Ef(), h = this.transform, k = 1 / (h.m11 * h.m22 - h.m12 * h.m21), l = h.m22 * k, m = - h.m12 * k, n = - h.m21 * k, p = h.m11 * k, q = k * (h.m21 * h.dy - h.m22 * h.dx), r = k * (h.m12 * h.dx - h.m11 * h.dy);
        if (null !== this.Zk)
        return h = this.pa, H.kl(h.left, h.top, h.right, h.bottom, a, b, c, d, f);
        if (null !== this.background)
        g = a * l + b * n + q, k = a * m + b * p + r, a = c * l + d * n + q, c = c * m + d * p + r, f.p(0, 0), d = this.Qa, c = H.kl(0, 0, d.width, d.height, g, k, a, c, f), f.transform(h);
        else {
        g || (l = 1, n = m = 0, p = 1, r = q = 0);
                k = a * l + b * n + q;
                a = a * m + b * p + r;
                l = c * l + d * n + q;
                d = c * m + d * p + r;
                f.p(l, d);
                m = (l - k) * (l - k) + (d - a) * (d - a);
                c = !1;
                p = this.xa.n;
                r = p.length;
                n = t.K();
                for (q = 0; q < r; q++)
                b = p[q], b.visible && b.jp(k, a, l, d, n) && (c = !0, b = (k - n.x) * (k - n.x) + (a - n.y) * (a - n.y), b < m && (m = b, f.set(n)));
                t.B(n);
                g && f.transform(h)
                }
return c
        };
        y.prototype.tt = function(a, b, c, d) {
        var f = this.Pi;
                f.width = 0;
                f.height = 0;
                var g = this.Ca, h = this.Rf;
                void 0 === c && (c = h.width, d = h.height);
                c = Math.max(c, h.width);
                d = Math.max(d, h.height);
                var k = this.He;
                isNaN(g.width) || (a = Math.min(g.width, k.width));
                isNaN(g.height) || (b = Math.min(g.height, k.height));
                a = Math.max(c, a);
                b = Math.max(d, b);
                var l = this.padding;
                a = Math.max(a - l.left - l.right, 0);
                b = Math.max(b - l.top - l.bottom, 0);
                var m = this.xa, n = m.length;
                if (0 !== n) {
        var p = this.da.Yb;
                switch (p) {
        case "Position":
                var q = a, r = b, s = c, u = d;
                f.x = 0;
                f.y =
                0;
                f.width = 0;
                for (var v = f.height = 0; v < n; v++) {
        var D = m.n[v];
                if (D.visible || D === this.kc) {
        var A = D.margin, G = A.right + A.left, L = A.top + A.bottom;
                ih(D, q, r, s, u);
                var N = D.Ea, O = Math.max(N.width + G, 0), U = Math.max(N.height + L, 0), Y = D.position.x, ba = D.position.y;
                isFinite(Y) || (Y = 0);
                isFinite(ba) || (ba = 0);
                if (D instanceof W && D.rA)
                var R = D.fb / 2, Y = Y - R, ba = ba - R;
                hb(f, Y, ba, O, U)
                }
        }
        break;
                case "Vertical":
                for (var xa = a, Ya = c, za = t.Cb(), Na = 0; Na < n; Na++) {
        var va = m.n[Na];
                if (va.visible || va === this.kc) {
        var Pa = kk(va);
                if (Pa !== Vg && Pa !== bk)
                za.push(va);
                else {
                var Ga =
                        va.margin, Jf = Ga.right + Ga.left, lf = Ga.top + Ga.bottom;
                        ih(va, xa, Infinity, Ya, 0);
                        var Zb = va.Ea, fg = Math.max(Zb.width + Jf, 0), ic = Math.max(Zb.height + lf, 0);
                        f.width = Math.max(f.width, fg);
                        f.height += ic
                        }
        }
        }
        var kb = za.length;
                if (0 !== kb) {
        this.Ca.width ? xa = Math.min(this.Ca.width, this.He.width) : 0 !== f.width && (xa = Math.min(f.width, this.He.width));
                for (Na = 0; Na < kb; Na++)
                if (va = za[Na], va.visible || va === this.kc)
                Ga = va.margin, Jf = Ga.right + Ga.left, lf = Ga.top + Ga.bottom, ih(va, xa, Infinity, Ya, 0), Zb = va.Ea, fg = Math.max(Zb.width + Jf, 0), ic = Math.max(Zb.height +
                lf, 0), f.width = Math.max(f.width, fg), f.height += ic;
                t.ya(za)
                }
        break;
                case "Horizontal":
                for (var fb = b, Ia = d, Ja = t.Cb(), Xa = 0; Xa < n; Xa++) {
        var db = m.n[Xa];
                if (db.visible || db === this.kc) {
        var Ab = kk(db);
                if (Ab !== Vg && Ab !== ck)
                Ja.push(db);
                else {
                var md = db.margin, mf = md.right + md.left, Dd = md.top + md.bottom;
                        ih(db, Infinity, fb, 0, Ia);
                        var nd = db.Ea, Ne = Math.max(nd.width + mf, 0), Ed = Math.max(nd.height + Dd, 0);
                        f.width += Ne;
                        f.height = Math.max(f.height, Ed)
                        }
        }
        }
        var te = Ja.length;
                if (0 !== te) {
        this.Ca.height ? fb = Math.min(this.Ca.height, this.He.height) : 0 !==
                f.height && (fb = Math.min(f.height, this.He.height));
                for (Xa = 0; Xa < te; Xa++)
                if (db = Ja[Xa], db.visible || db === this.kc)
                md = db.margin, mf = md.right + md.left, Dd = md.top + md.bottom, ih(db, Infinity, fb, 0, Ia), nd = db.Ea, Ne = Math.max(nd.width + mf, 0), Ed = Math.max(nd.height + Dd, 0), f.width += Ne, f.height = Math.max(f.height, Ed);
                t.ya(Ja)
                }
        break;
                case "Spot":
                a:{
                var Kf = a, Bb = b, Bg = c, Hb = d, qb = Ek(this, m, n), Za = qb.margin, yb, jc, Lf = Za.right + Za.left, Mf = Za.top + Za.bottom;
                        ih(qb, Kf, Bb, Bg, Hb);
                        var kc = qb.Ea, Uc = kc.width, od = kc.height, dc = Math.max(Uc + Lf, 0), pd =
                        Math.max(od + Mf, 0);
                        f.x = - Za.left;
                        f.y = - Za.top;
                        f.width = dc;
                        f.height = pd;
                        for (var $a = 0; $a < n; $a++) {
                var Ta = m.n[$a];
                        if (Ta !== qb && (Ta.visible || Ta === this.kc)) {
                Za = Ta.margin;
                        yb = Za.right + Za.left;
                        jc = Za.top + Za.bottom;
                        ih(Ta, Kf, Bb, 0, 0);
                        var kc = Ta.Ea, dc = Math.max(kc.width + yb, 0), pd = Math.max(kc.height + jc, 0), Qb = Ta.alignment;
                        Qb.Nc() && (Qb = this.Xj);
                        Qb.vd() || (Qb = Kb);
                        var Ib = Ta.Rj;
                        Ib.Nc() && (Ib = Kb);
                        hb(f, Qb.x * Uc + Qb.offsetX - (Ib.x * kc.width - Ib.offsetX) - Za.left, Qb.y * od + Qb.offsetY - (Ib.y * kc.height - Ib.offsetY) - Za.top, dc, pd)
                        }
                }
                var Oe = qb.gi;
                        Oe === Wg && (Oe = kk(qb));
                        switch (Oe) {
                case Vg:
                        break a;
                        case Cc:
                        if (!isFinite(Kf) && !isFinite(Bb))
                        break a;
                        break;
                        case ck:
                        if (!isFinite(Kf))
                        break a;
                        break;
                        case bk:
                        if (!isFinite(Bb))
                        break a
                        }
                kc = qb.Ea;
                        Uc = kc.width;
                        od = kc.height;
                        dc = Math.max(Uc + Lf, 0);
                        pd = Math.max(od + Mf, 0);
                        Za = qb.margin;
                        f.x = - Za.left;
                        f.y = - Za.top;
                        f.width = dc;
                        f.height = pd;
                        for ($a = 0; $a < n; $a++)
                        Ta = m.n[$a], Ta === qb || !Ta.visible && Ta !== this.kc || (Za = Ta.margin, yb = Za.right + Za.left, jc = Za.top + Za.bottom, kc = Ta.Ea, dc = Math.max(kc.width + yb, 0), pd = Math.max(kc.height + jc, 0), Qb = Ta.alignment,
                        Qb.Nc() && (Qb = this.Xj), Qb.vd() || (Qb = Kb), Ib = Ta.Rj, Ib.Nc() && (Ib = Kb), hb(f, Qb.x * Uc + Qb.offsetX - (Ib.x * kc.width - Ib.offsetX) - Za.left, Qb.y * od + Qb.offsetY - (Ib.y * kc.height - Ib.offsetY) - Za.top, dc, pd))
                        }
        break;
                case "Auto":
                var Pd = a, oc = b, Jb = c, ee = d, rb = Ek(this, m, n), Fd = rb.margin, Cg = Fd.right + Fd.left, Pe = Fd.top + Fd.bottom;
                ih(rb, Pd, oc, Jb, ee);
                var Gd = rb.Ea, gb = Math.max(Gd.width + Cg, 0), nf = Math.max(Gd.height + Pe, 0), ib = Il(rb), sb = ib.x * gb + ib.offsetX, Vc = ib.y * nf + ib.offsetY, ib = Jl(rb), Mb = ib.x * gb + ib.offsetX, Qd = ib.y * nf + ib.offsetY, Rd = Pd, fe =
                oc;
                isFinite(Pd) && (Rd = Math.abs(sb - Mb));
                isFinite(oc) && (fe = Math.abs(Vc - Qd));
                var Fc = t.Al();
                Fc.p(0, 0);
                for (var ue = 0; ue < n; ue++) {
        var Gc = m.n[ue];
                if (Gc !== rb && (Gc.visible || Gc === this.kc)) {
        var Fd = Gc.margin, Cb = Fd.right + Fd.left, Qe = Fd.top + Fd.bottom;
                ih(Gc, Rd, fe, 0, 0);
                Gd = Gc.Ea;
                gb = Math.max(Gd.width + Cb, 0);
                nf = Math.max(Gd.height + Qe, 0);
                Fc.p(Math.max(gb, Fc.width), Math.max(nf, Fc.height))
                }
        }
        if (1 === n)
                f.width = gb, f.height = nf, t.bk(Fc);
                else {
                var qd = Il(rb), lb = Jl(rb), Hd, Db;
                        lb.x !== qd.x && lb.y !== qd.y && (Hd = Fc.width / Math.abs(lb.x - qd.x),
                                Db = Fc.height / Math.abs(lb.y - qd.y));
                        t.bk(Fc);
                        var Sd = 0;
                        rb instanceof W && (Sd = rb.fb * rb.scale, Kl(rb) === Xg && (Hd = Math.max(Hd, Db), Db = Math.max(Hd, Db)));
                        Hd += Math.abs(qd.offsetX) + Math.abs(lb.offsetX) + Sd;
                        Db += Math.abs(qd.offsetY) + Math.abs(lb.offsetY) + Sd;
                        var Id = rb.gi;
                        Id === Wg && (Id = kk(rb));
                        switch (Id) {
                case Vg:
                        ee = Jb = 0;
                        break;
                        case Cc:
                        isFinite(Pd) && (Hd = Pd);
                        isFinite(oc) && (Db = oc);
                        break;
                        case ck:
                        isFinite(Pd) && (Hd = Pd);
                        ee = 0;
                        break;
                        case bk:
                        Jb = 0, isFinite(oc) && (Db = oc)
                        }
                rb instanceof W && !rb.Ca.N() && (rb.Zg ? rb.xk = null : rb.Oa = null);
                        Fk(rb);
                        ih(rb, Hd, Db, Jb, ee);
                        f.width = rb.Ea.width + Cg;
                        f.height = rb.Ea.height + Pe
                        }
        break;
                case "Table":
                for (var lc = a, Nb = b, tb = n, of = c, bb = d, Jd = t.Cb(), Wc = t.Cb(), la = 0; la < tb; la++) {
        var sa = m.n[la];
                if (sa instanceof y && (sa.type === tk || sa.type === uk) && sa.visible) {
        Wc.push(sa);
                for (var sj = sa.xa, nh = sj.length, wc = 0; wc < nh; wc++) {
        var oh = sj.n[wc];
                sa.type === tk ? oh.rc = sa.rc : sa.type === uk && (oh.column = sa.column);
                Jd.push(oh)
                }
        } else
                Jd.push(sa)
                }
        for (var tb = Jd.length, ec = [], la = 0; la < tb; la++)
                sa = Jd[la], lk(sa, !0), pk(sa, !0), ec[sa.rc] || (ec[sa.rc] = []), ec[sa.rc][sa.column] ||
                (ec[sa.rc][sa.column] = []), ec[sa.rc][sa.column].push(sa);
                t.ya(Jd);
                for (var Dg = t.Cb(), gg = t.Cb(), Hc = t.Cb(), Ic = {count: 0}, Jc = {count: 0}, xc = lc, Kc = Nb, Nf = this.jd, tb = Nf.length, la = 0; la < tb; la++) {
        var ka = Nf[la];
                void 0 !== ka && Ll(ka, 0)
                }
        Nf = this.cd;
                tb = Nf.length;
                for (la = 0; la < tb; la++)
                ka = Nf[la], void 0 !== ka && Ll(ka, 0);
                for (var ge = ec.length, Td = 0, la = 0; la < ge; la++)
                ec[la] && (Td = Math.max(Td, ec[la].length));
                for (var hg = Math.min(this.Oi, ge - 1), tj = Math.min(this.zi, Td - 1), Xc, ge = ec.length, la = hg; la < ge; la++)
                if (ec[la]) {
        var Td = ec[la].length,
                jb = this.pe(la);
                Ll(jb, 0);
                for (wc = tj; wc < Td; wc++)
                if (ec[la][wc]) {
        var nb = this.oe(wc);
                void 0 === Dg[wc] && (Ll(nb, 0), Dg[wc] = !0);
                for (var hi = ec[la][wc], sl = hi.length, ig = 0; ig < sl; ig++)
                if (sa = hi[ig], sa.visible || sa === this.kc) {
        var jg = 1 < sa.Kj || 1 < sa.rj;
                jg && gg.push(sa);
                var Rb = sa.margin, Of = Rb.right + Rb.left, Pf = Rb.top + Rb.bottom, Ud = Ik(sa, jb, nb), he = sa.Ca, ph = !isNaN(he.width), Qf = !isNaN(he.height), Re = ph && Qf;
                jg || Ud === Vg || Re || (void 0 === Ic[wc] && (Ic[wc] = - 1, Ic.count++), void 0 === Jc[la] && (Jc[la] = - 1, Jc.count++), Hc.push(sa));
                ih(sa, Infinity,
                        Infinity, 0, 0);
                var ve = sa.Ea, Se = Math.max(ve.width + Of, 0), Te = Math.max(ve.height + Pf, 0);
                1 !== sa.Kj || !Qf && Ud !== Vg && Ud !== ck || (ka = this.pe(la), Xc = Math.max(Te - ka.fc, 0), Xc > Kc && (Xc = Kc), Ll(ka, ka.fc + Xc), Kc = Math.max(Kc - Xc, 0));
                1 !== sa.rj || !ph && Ud !== Vg && Ud !== bk || (ka = this.oe(wc), Xc = Math.max(Se - ka.fc, 0), Xc > xc && (Xc = xc), Ll(ka, ka.fc + Xc), xc = Math.max(xc - Xc, 0));
                jg && Fk(sa)
                }
        }
        }
        t.ya(Dg);
                for (var ie = 0, je = 0, tb = this.iw, la = 0; la < tb; la++)
                void 0 !== this.cd[la] && (ie += this.oe(la).Kb);
                tb = this.lx;
                for (la = 0; la < tb; la++)
                void 0 !== this.jd[la] && (je +=
                this.pe(la).Kb);
                for (var xc = Math.max(lc - ie, 0), sd = Kc = Math.max(Nb - je, 0), qh = xc, tb = Hc.length, la = 0; la < tb; la++) {
        var sa = Hc[la], jb = this.pe(sa.rc), nb = this.oe(sa.column), Eg = sa.Ea, Rb = sa.margin, Of = Rb.right + Rb.left, Pf = Rb.top + Rb.bottom;
                Ic[sa.column] = 0 === nb.fc ? Math.max(Eg.width + Of, Ic[sa.column]) : null;
                Jc[sa.rc] = 0 === jb.fc ? Math.max(Eg.height + Pf, Jc[sa.rc]) : null
                }
        var Vd = 0, Fg = 0;
                for (la in Jc)
                "count" !== la && (Vd += Jc[la]);
                for (la in Ic)
                "count" !== la && (Fg += Ic[la]);
                for (var zb = t.Al(), la = 0; la < tb; la++)
                if (sa = Hc[la], sa.visible || sa ===
                        this.kc) {
        var jb = this.pe(sa.rc), nb = this.oe(sa.column), ke;
                isFinite(nb.width) ? ke = nb.width : (ke = isFinite(xc) && null !== Ic[sa.column] ? 0 === Fg ? nb.fc + xc : Ic[sa.column] / Fg * qh : null !== Ic[sa.column] ? xc : nb.fc || xc, ke = Math.max(0, ke - Hl(nb)));
                var pf;
                isFinite(jb.height) ? pf = jb.height : (pf = isFinite(Kc) && null !== Jc[sa.rc] ? 0 === Vd ? jb.fc + Kc : Jc[sa.rc] / Vd * sd : null !== Jc[sa.rc] ? Kc : jb.fc || Kc, pf = Math.max(0, pf - Hl(jb)));
                zb.p(Math.max(nb.ei, Math.min(ke, nb.xf)), Math.max(jb.ei, Math.min(pf, jb.xf)));
                Ud = Ik(sa, jb, nb);
                switch (Ud) {
        case ck:
                zb.height =
                Infinity;
                break;
                case bk:
                zb.width = Infinity
                }
        Rb = sa.margin;
                Of = Rb.right + Rb.left;
                Pf = Rb.top + Rb.bottom;
                Fk(sa);
                ih(sa, zb.width, zb.height, nb.ei, jb.ei);
                ve = sa.Ea;
                Se = Math.max(ve.width + Of, 0);
                Te = Math.max(ve.height + Pf, 0);
                isFinite(xc) && (Se = Math.min(Se, zb.width));
                isFinite(Kc) && (Te = Math.min(Te, zb.height));
                var qf;
                qf = jb.fc;
                Ll(jb, Math.max(jb.fc, Te));
                Xc = jb.fc - qf;
                Kc = Math.max(Kc - Xc, 0);
                qf = nb.fc;
                Ll(nb, Math.max(nb.fc, Se));
                Xc = nb.fc - qf;
                xc = Math.max(xc - Xc, 0)
                }
        t.ya(Hc);
                for (var Wd = t.Al(), tb = gg.length, la = 0; la < tb; la++)
                if (sa = gg[la], sa.visible ||
                        sa === this.kc) {
        jb = this.pe(sa.rc);
                nb = this.oe(sa.column);
                zb.p(Math.max(nb.ei, Math.min(lc, nb.xf)), Math.max(jb.ei, Math.min(Nb, jb.xf)));
                Ud = Ik(sa, jb, nb);
                switch (Ud) {
        case Cc:
                0 !== nb.fc && (zb.width = Math.min(zb.width, nb.fc));
                0 !== jb.fc && (zb.height = Math.min(zb.height, jb.fc));
                break;
                case ck:
                0 !== nb.fc && (zb.width = Math.min(zb.width, nb.fc));
                break;
                case bk:
                0 !== jb.fc && (zb.height = Math.min(zb.height, jb.fc))
                }
        isFinite(nb.width) && (zb.width = nb.width);
                isFinite(jb.height) && (zb.height = jb.height);
                Wd.p(0, 0);
                for (var fc = 1; fc < sa.Kj &&
                        !(sa.rc + fc >= this.lx); fc++)
                ka = this.pe(sa.rc + fc), Wd.height += Math.max(ka.ei, isNaN(ka.Jf) ? ka.xf : Math.min(ka.Jf, ka.xf));
                for (fc = 1; fc < sa.rj && !(sa.column + fc >= this.iw); fc++)
                ka = this.oe(sa.column + fc), Wd.width += Math.max(ka.ei, isNaN(ka.Jf) ? ka.xf : Math.min(ka.Jf, ka.xf));
                zb.width += Wd.width;
                zb.height += Wd.height;
                Rb = sa.margin;
                Of = Rb.right + Rb.left;
                Pf = Rb.top + Rb.bottom;
                ih(sa, zb.width, zb.height, of, bb);
                for (var ve = sa.Ea, Se = Math.max(ve.width + Of, 0), Te = Math.max(ve.height + Pf, 0), Gg = 0, fc = 0; fc < sa.Kj; fc++)
                ka = this.pe(sa.rc + fc), Gg +=
                ka.total || 0;
                if (Gg < Te)
                for (var Xd = Te - Gg; 0 < Xd; ) {
        var pc = ka.Kb || 0;
                isNaN(ka.height) && ka.xf > pc && (Ll(ka, Math.min(ka.xf, pc + Xd)), ka.Kb !== pc && (Xd -= ka.Kb - pc));
                if ( - 1 === ka.index - 1)
                break;
                ka = this.pe(ka.index - 1)
                }
        for (var Ue = 0, fc = 0; fc < sa.rj; fc++)
                ka = this.oe(sa.column + fc), Ue += ka.total || 0;
                if (Ue < Se)
                for (Xd = Se - Ue; 0 < Xd; ) {
        pc = ka.Kb || 0;
                isNaN(ka.width) && ka.xf > pc && (Ll(ka, Math.min(ka.xf, pc + Xd)), ka.Kb !== pc && (Xd -= ka.Kb - pc));
                if ( - 1 === ka.index - 1)
                break;
                ka = this.oe(ka.index - 1)
                }
        }
        t.ya(gg);
                t.bk(Wd);
                t.bk(zb);
                for (var rf = 0, le = 0, Ud = kk(this), Hg =
                        this.Ca, kg = this.He, Lc = je = ie = 0, me = 0, tb = this.iw, la = 0; la < tb; la++)
                void 0 !== this.cd[la] && (ka = this.oe(la), isFinite(ka.width) ? (Lc += ka.width, Lc += Hl(ka)) : Ml(ka) === Nl ? (Lc += ka.Kb, Lc += Hl(ka)) : 0 !== ka.Kb && (ie += ka.Kb, ie += Hl(ka)));
                var rf = isFinite(Hg.width) ? Math.min(Hg.width, kg.width) : Ud !== Vg && isFinite(lc) ? lc : ie, rf = Math.max(rf, this.Rf.width), rf = Math.max(rf - Lc, 0), Jg = Math.max(rf / ie, 1);
                isFinite(Jg) || (Jg = 1);
                for (la = 0; la < tb; la++)
                void 0 !== this.cd[la] && (ka = this.oe(la), isFinite(ka.width) || Ml(ka) === Nl || Ll(ka, ka.Kb * Jg), ka.Ma =
                f.width, 0 !== ka.Kb && (f.width += ka.Kb, f.width += Hl(ka)));
                tb = this.lx;
                for (la = 0; la < tb; la++)
                void 0 !== this.jd[la] && (ka = this.pe(la), isFinite(ka.height) ? (me += ka.height, me += Hl(ka)) : Ml(ka) === Nl ? (me += ka.Kb, me += Hl(ka)) : 0 !== ka.Kb && (je += ka.Kb, je += Hl(ka)));
                var le = isFinite(Hg.height) ? Math.min(Hg.height, kg.height) : Ud !== Vg && isFinite(Nb) ? Nb : je, le = Math.max(le, this.Rf.height), le = Math.max(le - me, 0), Ve = Math.max(le / je, 1);
                isFinite(Ve) || (Ve = 1);
                for (la = 0; la < tb; la++)
                void 0 !== this.jd[la] && (ka = this.pe(la), isFinite(ka.height) || Ml(ka) ===
                Nl || Ll(ka, ka.Kb * Ve), ka.Ma = f.height, 0 !== ka.Kb && (f.height += ka.Kb, f.height += Hl(ka)));
                tb = Wc.length;
                for (la = 0; la < tb; la++) {
        var Yc = Wc[la];
                Yc.type === tk ? (ke = f.width, ka = this.pe(Yc.rc), pf = ka.fc) : (ka = this.oe(Yc.column), ke = ka.fc, pf = f.height);
                Yc.Tc.p(0, 0, ke, pf);
                lk(Yc, !1);
                ec[Yc.rc] || (ec[Yc.rc] = []);
                ec[Yc.rc][Yc.column] || (ec[Yc.rc][Yc.column] = []);
                ec[Yc.rc][Yc.column].push(Yc)
                }
        t.ya(Wc);
                this.as = ec;
                break;
                case "Viewbox":
                var vj = a, wj = b, Fo = c, Go = d;
                1 < n && t.m("Viewbox Panel cannot contain more than one GraphObject.");
                var ne =
                m.n[0];
                ne.nc = 1;
                Fk(ne);
                ih(ne, Infinity, Infinity, Fo, Go);
                var ii = ne.Ea, xj = ne.margin, Ho = xj.right + xj.left, Io = xj.top + xj.bottom;
                if (isFinite(vj) || isFinite(wj)) {
        var Lq = ne.scale, Jo = ii.width, Ko = ii.height, Lo = Math.max(vj - Ho, 0), Mo = Math.max(wj - Io, 0);
                ne.nc = this.Io === Xg ? ne.nc * Math.min(Lo / Jo, Mo / Ko) : ne.nc * Math.max(Lo / Jo, Mo / Ko);
                Lq !== ne.scale && (lk(ne, !0), ih(ne, Infinity, Infinity, Fo, Go))
                }
        ii = ne.Ea;
                f.width = isFinite(vj) ? vj : Math.max(ii.width + Ho, 0);
                f.height = isFinite(wj) ? wj : Math.max(ii.height + Io, 0);
                break;
                case "Link":
                var yj = this instanceof
                Ke ? this.Wh : this;
                if (0 === n) {
        var zj = this.gd;
                Va(zj, 0, 0);
                var Yd = this.Ea;
                Yd.p(0, 0, 0, 0)
                } else {
        var Aj = this.Qq(), We = this.uj(), we = this.Pi;
                we.assign(We);
                we.x = 0;
                we.y = 0;
                var rh, ji = this.Py();
                rh = void 0 !== this.oa ? this.oa : ji.count;
                this.Wg.p(We.x, We.y);
                this.mi.clear();
                null !== Aj && (Ol(Aj, We.width, We.height), Yd = Aj.Ea, we.kj(Yd), this.mi.add(Yd));
                for (var sh = t.oh(), ki = t.K(), Rf = t.K(), tl = 0; tl < n; tl++) {
        var Sb = m.n[tl];
                if (Sb !== Aj)
                if (Sb.ej && Sb instanceof W)
                Ol(Sb, We.width, We.height), Yd = Sb.Ea, we.kj(Yd), this.mi.add(Yd);
                else if (2 > rh)
                ih(Sb,
                        Infinity, Infinity), Yd = Sb.Ea, we.kj(Yd), this.mi.add(Yd);
                else {
                var Sf = Sb.Af, Oo = Sb.Kt, ul = Sb.Rj;
                        ul.Ge() && (ul = Kb);
                        var li = Sb.Lt, Mq = Sb.ZA, mi, ni, Bj = 0;
                        if (Sf < - rh || Sf >= rh) {
                var Po = yj.xF, oi = yj.wF;
                        li !== zg && (Bj = yj.computeAngle(Sb, li, oi), Sb.angle = Bj);
                        mi = Po.x - We.x;
                        ni = Po.y - We.y
                        } else {
                var sf, th;
                        if (0 <= Sf)
                        sf = ji.n[Sf], th = Sf < rh - 1 ? ji.n[Sf + 1] : sf;
                        else {
                        var vl = rh + Sf;
                                sf = ji.n[vl];
                                th = 0 < vl ? ji.n[vl - 1] : sf
                                }
                oi = 0 <= Sf ? sf.Zi(th) : th.Zi(sf);
                        li !== zg && (Bj = yj.computeAngle(Sb, li, oi), Sb.wn = Bj);
                        mi = sf.x + (th.x - sf.x) * Oo - We.x;
                        ni = sf.y + (th.y - sf.y) * Oo -
                        We.y
                        }
                ih(Sb, Infinity, Infinity);
                        var Yd = Sb.Ea, zj = Sb.Qa, pi = 0;
                        Sb instanceof W && (pi = Sb.fb);
                        var Cj = zj.width + pi, wl = zj.height + pi;
                        sh.reset();
                        sh.translate( - Yd.x, - Yd.y);
                        sh.scale(Sb.scale, Sb.scale);
                        sh.rotate(li === zg ? Sb.angle : oi, Cj / 2, wl / 2);
                        var uh = new x(0, 0, Cj, wl);
                        ki.Nt(uh, ul);
                        sh.Ta(ki);
                        var Nq = - ki.x + pi / 2, Oq = - ki.y + pi / 2;
                        Rf.assign(Mq);
                        isNaN(Rf.x) && (Rf.x = 0 <= Sf ? Cj / 2 + 3 : - (Cj / 2 + 3));
                        isNaN(Rf.y) && (Rf.y = - (wl / 2 + 3));
                        Rf.rotate(oi);
                        mi += Rf.x;
                        ni += Rf.y;
                        uh.set(Yd);
                        uh.x = mi + Nq;
                        uh.y = ni + Oq;
                        this.mi.add(uh);
                        we.kj(uh)
                        }
        }
        if (this.we)
                for (var Qo =
                        this.ek; Qo.next(); )
                ih(Qo.value, Infinity, Infinity);
                this.Pi = we;
                var Dj = this.Wg;
                Dj && Dj.p(Dj.x + we.x, Dj.y + we.y);
                Va(f, we.width || 0, we.height || 0);
                t.We(sh);
                t.B(ki);
                t.B(Rf)
                }
        break;
                case "Grid":
                break;
                case "TableRow":
                case "TableColumn":
                t.m(this.toString() + " is not an element of a Table Panel. TableRow and TableColumn Panels can only be elements of a Table Panel.");
                break;
                default:
                t.m("Unknown panel type: " + p)
                }
        }
        var xe = f.width, ye = f.height, Ej = this.padding, Pq = Ej.top + Ej.bottom, xe = xe + (Ej.left + Ej.right), ye = ye + Pq;
                isFinite(g.width) &&
                (xe = g.width);
                isFinite(g.height) && (ye = g.height);
                xe = Math.min(k.width, xe);
                ye = Math.min(k.height, ye);
                xe = Math.max(h.width, xe);
                ye = Math.max(h.height, ye);
                xe = Math.max(c, xe);
                ye = Math.max(d, ye);
                f.width = xe;
                f.height = ye;
                Va(this.gd, xe, ye);
                hk(this, 0, 0, xe, ye)
                };
        y.prototype.findMainElement = y.prototype.zw = function() {
        null === this.Eo && Ek(this, this.xa, this.xa.length);
                return this.Eo
                };
        function Ek(a, b, c) {
        for (var d = 0; d < c; d++) {
        var f = b.n[d];
                if (!0 === f.ej)
                return a.Eo = f
        }
        b = b.n[0];
                return a.Eo = b
        }
y.prototype.Uj = function(a, b, c, d) {
var f = this.Pi, g = this.xa, h = g.length, k = t.hk(0, 0, 0, 0);
        if (0 === h) {
var l = this.pa;
        l.x = a;
        l.y = b;
        l.width = c;
        l.height = d
        } else {
if (!this.Ca.N()) {
var m = kk(this), n = this.Tc, p = n.width, q = n.height, r = this.margin, s = r.left + r.right, u = r.top + r.bottom;
        p === c && q === d && (m = Vg);
        switch (m) {
case Vg:
        if (p > c || q > d)
        this.fa(), ih(this, p > c ? c : p, q > d ? d : q);
        break;
        case Cc:
        lk(this, !0);
        ih(this, c + s, d + u, 0, 0);
        break;
        case ck:
        lk(this, !0);
        ih(this, c + s, q + u, 0, 0);
        break;
        case bk:
        lk(this, !0), ih(this, p + s, d + u, 0, 0)
        }
}
l = this.pa;
        l.x = a;
        l.y = b;
        l.width = c;
        l.height = d;
        var v = this.da.Yb;
        switch (v) {
case "Position":
        for (var D = f.x - this.padding.left, A = f.y - this.padding.top, G = 0; G < h; G++) {
var L = g.n[G], N = L.Ea, O = L.margin, U = L.position.x, Y = L.position.y;
        k.x = isNaN(U) ? - D : U - D;
        k.y = isNaN(Y) ? - A : Y - A;
        if (L instanceof W && L.rA) {
var ba = L.fb / 2;
        k.x -= ba;
        k.y -= ba
        }
k.x += O.left;
        k.y += O.top;
        k.width = N.width;
        k.height = N.height;
        L.visible && L.Jc(k.x, k.y, k.width, k.height)
        }
break;
        case "Vertical":
        for (var R = this.padding.left, xa = this.padding.top, Ya = 0; Ya < h; Ya++) {
var za = R, Na = g.n[Ya];
        if (Na.visible) {
var va =
        Na.Ea, Pa = Na.margin, Ga = Pa.left + Pa.right, Jf = R + this.padding.right, lf = va.width, Zb = kk(Na);
        if (isNaN(Na.Ca.width) && Zb === Cc || Zb === ck)
        lf = Math.max(f.width - Ga - Jf, 0);
        var fg = lf + Ga + Jf, ic = Na.alignment;
        ic.Nc() && (ic = this.Xj);
        ic.vd() || (ic = Kb);
        Na.Jc(za + ic.offsetX + Pa.left + (f.width * ic.x - fg * ic.x), xa + ic.offsetY + Pa.top, lf, va.height);
        xa += va.height + Pa.bottom + Pa.top
        }
}
break;
        case "Horizontal":
        for (var kb = this.padding.top, fb = this.padding.left, Ia = 0; Ia < h; Ia++) {
var Ja = kb, Xa = g.n[Ia];
        if (Xa.visible) {
var db = Xa.Ea, Ab = Xa.margin, md = Ab.top +
        Ab.bottom, mf = kb + this.padding.bottom, Dd = db.height, nd = kk(Xa);
        if (isNaN(Xa.Ca.height) && nd === Cc || nd === bk)
        Dd = Math.max(f.height - md - mf, 0);
        var Ne = Dd + md + mf, Ed = Xa.alignment;
        Ed.Nc() && (Ed = this.Xj);
        Ed.vd() || (Ed = Kb);
        Xa.Jc(fb + Ed.offsetX + Ab.left, Ja + Ed.offsetY + Ab.top + (f.height * Ed.y - Ne * Ed.y), db.width, Dd);
        fb += db.width + Ab.left + Ab.right
        }
}
break;
        case "Spot":
        var te = Ek(this, g, h), Kf = te.Ea, Bb = Kf.width, Bg = Kf.height, Hb = this.padding, qb = Hb.left, Za = Hb.top;
        k.x = qb - f.x;
        k.y = Za - f.y;
        te.Jc(k.x, k.y, Bb, Bg);
        for (var yb = 0; yb < h; yb++) {
var jc =
        g.n[yb];
        if (jc !== te) {
var Lf = jc.Ea, Mf = Lf.width, kc = Lf.height, Uc = jc.alignment;
        Uc.Nc() && (Uc = this.Xj);
        Uc.vd() || (Uc = Kb);
        var od = jc.Rj;
        od.Nc() && (od = Kb);
        k.x = Uc.x * Bb + Uc.offsetX - (od.x * Mf - od.offsetX);
        k.y = Uc.y * Bg + Uc.offsetY - (od.y * kc - od.offsetY);
        k.x -= f.x;
        k.y -= f.y;
        jc.visible && jc.Jc(qb + k.x, Za + k.y, Mf, kc)
        }
}
break;
        case "Auto":
        var dc = Ek(this, g, h), pd = dc.Ea, $a = t.Df();
        $a.p(0, 0, 1, 1);
        var Ta = dc.margin, Qb = Ta.left, Ib = Ta.top, Oe = this.padding, Pd = Oe.left, oc = Oe.top;
        k.x = Qb;
        k.y = Ib;
        k.width = pd.width;
        k.height = pd.height;
        dc.Jc(Pd + k.x, oc +
                k.y, k.width, k.height);
        var Jb = Il(dc), ee = Jl(dc), rb = 0 + Jb.y * pd.height + Jb.offsetY, Fd = 0 + ee.x * pd.width + ee.offsetX, Cg = 0 + ee.y * pd.height + ee.offsetY;
        $a.x = 0 + Jb.x * pd.width + Jb.offsetX;
        $a.y = rb;
        hb($a, Fd, Cg, 0, 0);
        $a.x += Qb + Pd;
        $a.y += Ib + oc;
        for (var Pe = 0; Pe < h; Pe++) {
var Gd = g.n[Pe];
        if (Gd !== dc) {
var gb = Gd.Ea, Ta = Gd.margin, nf = Math.max(gb.width + Ta.right + Ta.left, 0), ib = Math.max(gb.height + Ta.top + Ta.bottom, 0), sb = Gd.alignment;
        sb.Nc() && (sb = this.Xj);
        sb.vd() || (sb = Kb);
        k.x = $a.width * sb.x + sb.offsetX - nf * sb.x + Ta.left + $a.x;
        k.y = $a.height * sb.y +
        sb.offsetY - ib * sb.y + Ta.top + $a.y;
        k.width = $a.width;
        k.height = $a.height;
        Gd.visible && (mb($a.x, $a.y, $a.width, $a.height, k.x, k.y, gb.width, gb.height) ? Gd.Jc(k.x, k.y, gb.width, gb.height) : Gd.Jc(k.x, k.y, gb.width, gb.height, new x($a.x, $a.y, $a.width, $a.height)))
        }
}
t.hc($a);
        break;
        case "Table":
        for (var Vc = this.padding, Mb = Vc.left, Qd = Vc.top, Rd = this.as, fe, Fc, ue = Rd.length, Gc = 0, Cb = 0; Cb < ue; Cb++)
        Rd[Cb] && (Gc = Math.max(Gc, Rd[Cb].length));
        for (var Qe = Math.min(this.Oi, ue - 1); Qe !== ue && (void 0 === this.jd[Qe] || 0 === this.jd[Qe].Kb); )
        Qe++;
        for (var Qe = Math.min(Qe, ue - 1), qd = - this.jd[Qe].Ma, lb = Math.min(this.zi, Gc - 1); lb !== Gc && (void 0 === this.cd[lb] || 0 === this.cd[lb].Kb); )
        lb++;
        for (var lb = Math.min(lb, Gc - 1), Hd = - this.cd[lb].Ma, Db = t.Al(), Cb = 0; Cb < ue; Cb++)
        if (Rd[Cb]) {
var Gc = Rd[Cb].length, Sd = this.pe(Cb);
        Fc = Sd.Ma + qd + Qd + Pl(Sd);
        for (var Id = 0; Id < Gc; Id++)
        if (Rd[Cb][Id]) {
var lc = this.oe(Id);
        fe = lc.Ma + Hd + Mb + Pl(lc);
        for (var Nb = Rd[Cb][Id], tb = Nb.length, of = 0; of < tb; of++) {
var bb = Nb[of], Jd = bb.Ea;
        if (bb instanceof y && (bb.type === tk || bb.type === uk)) {
mk(bb);
        bb.cc.La();
        var Wc =
        bb.cc;
        Wc.x = bb.type === tk ? Mb : fe;
        Wc.y = bb.type === uk ? Qd : Fc;
        Wc.width = Jd.width;
        Wc.height = Jd.height;
        bb.cc.freeze();
        pk(bb, !1)
        } else {
Db.p(0, 0);
        for (var la = 1; la < bb.rowSpan && !(Cb + la >= this.lx); la++) {
var sa = this.pe(Cb + la);
        Db.height += sa.total
        }
for (la = 1; la < bb.ZD && !(Id + la >= this.iw); la++) {
var sj = this.oe(Id + la);
        Db.width += sj.total
        }
var nh = lc.Kb + Db.width, wc = Sd.Kb + Db.height;
        k.x = fe;
        k.y = Fc;
        k.width = nh;
        k.height = wc;
        var oh = fe, ec = Fc, Dg = nh, gg = wc;
        fe + nh > f.width && (Dg = Math.max(f.width - fe, 0));
        Fc + wc > f.height && (gg = Math.max(f.height - Fc, 0));
        var Hc = bb.alignment, Ic, Jc, xc, Kc;
        if (Hc.Nc()) {
Hc = this.Xj;
        Hc.vd() || (Hc = Kb);
        Ic = Hc.x;
        Jc = Hc.y;
        xc = Hc.offsetX;
        Kc = Hc.offsetY;
        var Nf = lc.alignment, ka = Sd.alignment;
        Nf.vd() && (Ic = Nf.x, xc = Nf.offsetX);
        ka.vd() && (Jc = ka.y, Kc = ka.offsetY)
        } else
        Ic = Hc.x, Jc = Hc.y, xc = Hc.offsetX, Kc = Hc.offsetY;
        if (isNaN(Ic) || isNaN(Jc))
        Jc = Ic = 0.5, Kc = xc = 0;
        var ge = Jd.width, Td = Jd.height, hg = bb.margin, tj = hg.left + hg.right, Xc = hg.top + hg.bottom, jb = Ik(bb, Sd, lc);
        !isNaN(bb.Ca.width) || jb !== Cc && jb !== ck || (ge = Math.max(nh - tj, 0));
        !isNaN(bb.Ca.height) || jb !== Cc && jb !==
        bk || (Td = Math.max(wc - Xc, 0));
        var nb = bb.He, hi = bb.Rf, ge = Math.min(nb.width, ge), Td = Math.min(nb.height, Td), ge = Math.max(hi.width, ge), Td = Math.max(hi.height, Td), sl = Td + Xc;
        k.x += k.width * Ic - (ge + tj) * Ic + xc + hg.left;
        k.y += k.height * Jc - sl * Jc + Kc + hg.top;
        bb.visible && (mb(oh, ec, Dg, gg, k.x, k.y, Jd.width, Jd.height) ? bb.Jc(k.x, k.y, ge, Td) : bb.Jc(k.x, k.y, ge, Td, new x(oh, ec, Dg, gg)))
        }
}
}
}
t.bk(Db);
        for (Cb = 0; Cb < h; Cb++)
        bb = g.n[Cb], bb instanceof y && (bb.type === tk || bb.type === uk) && (Wc = bb.cc, bb.gd.La(), bb.gd.Rp(0, 0, Wc.width, Wc.height), bb.gd.freeze());
        break;
        case "Viewbox":
        var ig = g.n[0], jg = ig.Ea, Rb = ig.margin, Of = Rb.top + Rb.bottom, Pf = Math.max(jg.width + (Rb.right + Rb.left), 0), Ud = Math.max(jg.height + Of, 0), he = ig.alignment;
        he.Nc() && (he = this.Xj);
        he.vd() || (he = Kb);
        k.x = f.width * he.x - Pf * he.x + he.offsetX;
        k.y = f.height * he.y - Ud * he.y + he.offsetY;
        k.width = jg.width;
        k.height = jg.height;
        ig.Jc(k.x, k.y, k.width, k.height);
        break;
        case "Link":
        var ph = this.Qq(), Qf = 0;
        if (null !== ph && Qf < this.mi.count) {
var Re = this.mi.n[Qf];
        Qf++;
        ph.Jc(Re.x - this.Pi.x, Re.y - this.Pi.y, Re.width, Re.height)
        }
for (var ve =
        0; ve < h; ve++) {
var Se = g.n[ve];
        Se !== ph && Qf < this.mi.count && (Re = this.mi.n[Qf], Qf++, Se.Jc(Re.x - this.Pi.x, Re.y - this.Pi.y, Re.width, Re.height))
        }
var Te = this.Py(), ie = Te.count;
        if (2 <= ie && this.we)
        for (var je = this.ek; je.next(); ) {
var sd = je.value, qh = ie, Eg = Te, Vd = sd.Af, Fg = sd.Kt, zb = sd.Rj;
        zb.Ge() && (zb = Kb);
        var ke = sd.Lt, pf = sd.ZA, qf = void 0, Wd = void 0, fc = 0;
        if (Vd < - qh || Vd >= qh) {
var Gg = this.xF, Xd = this.wF;
        ke !== zg && (fc = this.computeAngle(sd, ke, Xd), sd.angle = fc);
        qf = Gg.x;
        Wd = Gg.y
        } else {
var pc = void 0, Ue = void 0;
        if (0 <= Vd)
        pc = Eg.n[Vd], Ue = Vd <
        qh - 1 ? Eg.n[Vd + 1] : pc;
        else
        var rf = qh + Vd, pc = Eg.n[rf], Ue = 0 < rf ? Eg.n[rf - 1] : pc;
        Xd = 0 <= Vd ? pc.Zi(Ue) : Ue.Zi(pc);
        ke !== zg && (fc = this.computeAngle(sd, ke, Xd), sd.angle = fc);
        qf = pc.x + (Ue.x - pc.x) * Fg;
        Wd = pc.y + (Ue.y - pc.y) * Fg
        }
var le = t.oh();
        le.reset();
        le.scale(sd.scale, sd.scale);
        le.rotate(sd.angle, 0, 0);
        var Hg = sd.Qa, kg = t.hk(0, 0, Hg.width, Hg.height), Lc = t.K();
        Lc.Nt(kg, zb);
        le.Ta(Lc);
        var me = - Lc.x, Jg = - Lc.y, Ve = pf.copy();
        isNaN(Ve.x) && (Ve.x = 0 <= Vd ? Lc.x + 3 : - (Lc.x + 3));
        isNaN(Ve.y) && (Ve.y = - (Lc.y + 3));
        Ve.rotate(Xd);
        qf += Ve.x;
        Wd += Ve.y;
        le.GG(kg);
        var me = me + kg.x, Jg = Jg + kg.y, Yc = t.lc(qf + me, Wd + Jg);
        sd.move(Yc);
        t.B(Yc);
        t.B(Lc);
        t.hc(kg);
        t.We(le)
        }
this.Yw();
        break;
        case "Grid":
        break;
        case "TableRow":
        case "TableColumn":
        t.m(this.toString() + " is not an element of a Table Panel.TableRow and TableColumn panels can only be elements of a Table Panel.");
        break;
        default:
        t.m("Unknown panel type: " + v)
        }
t.hc(k)
        }
};
        y.prototype.Vj = function(a) {
        var b = this.Qa;
                if (mb(0, 0, b.width, b.height, a.x, a.y)) {
        for (var c = this.xa.length, b = t.lc(0, 0); c--; ) {
        var d = this.xa.n[0];
                if (d.visible || d === this.kc)
                if (Qa(b.set(a), d.transform), d.Ga(b))
                return t.B(b), !0
                }
        t.B(b);
                return null === this.Lb && null === this.uc ? !1 : !0
                }
        return!1
                };
        function Ql(a, b, c) {
        c(a, b);
                if (b instanceof y) {
        b = b.xa.n;
                for (var d = b.length, f = 0; f < d; f++)
                Ql(a, b[f], c)
        }
        }
function aj(a, b) {
Rl(a, a, b)
        }
function Rl(a, b, c) {
c(b);
        b = b.xa.n;
        for (var d = b.length, f = 0; f < d; f++) {
var g = b[f];
        g instanceof y && Rl(a, g, c)
        }
}
y.prototype.walkVisualTree = function(a) {
Sl(this, this, a)
        };
        function Sl(a, b, c) {
        c(b);
                if (b instanceof y) {
        b = b.xa.n;
                for (var d = b.length, f = 0; f < d; f++)
                Sl(a, b[f], c)
        }
        }
y.prototype.findInVisualTree = y.prototype.at = function(a) {
return Tl(this, this, a)
        };
        function Tl(a, b, c) {
        if (c(b))
                return b;
                if (b instanceof y) {
        b = b.xa.n;
                for (var d = b.length, f = 0; f < d; f++) {
        var g = Tl(a, b[f], c);
                if (null !== g)
                return g
        }
        }
        return null
        }
y.prototype.findObject = y.prototype.me = function(a) {
if (this.name === a)
        return this;
        for (var b = this.xa.n, c = b.length, d = 0; d < c; d++) {
var f = b[d];
        if (f.name === a)
        return f;
        if (f instanceof y)
        if (null === f.yi && null === f.eg) {
if (f = f.me(a), null !== f)
        return f
        } else if (Ul(f) && (f = f.xa.$a(), null !== f && (f = f.me(a), null !== f)))
        return f
        }
return null
        };
        function Vl(a) {
        a = a.xa.n;
                for (var b = a.length, c = 0, d = 0; d < b; d++) {
        var f = a[d];
                if (f instanceof y)
                c = Math.max(c, Vl(f));
                else if (f instanceof W) {
        a:{
        if (!f.Zg)
                switch (f.Qn) {
        case "None":
                case "Square":
                case "Ellipse":
                case "Circle":
                case "LineH":
                case "LineV":
                case "FramedRectangle":
                case "RoundedRectangle":
                case "Line1":
                case "Line2":
                case "Border":
                case "Cube1":
                case "Cube2":
                case "Junction":
                case "Cylinder1":
                case "Cylinder2":
                case "Cylinder3":
                case "Cylinder4":
                case "PlusLine":
                case "XLine":
                case "ThinCross":
                case "ThickCross":
                f = 0;
                break a
        }
        f = f.$g / 2 * f.vm * f.dk()
        }
        c = Math.max(c, f)
        }
        }
        return c
        }
aa = y.prototype;
        aa.Ef = function() {
        return!(this.type === tk || this.type === uk)
                };
        aa.ne = function(a, b, c) {
        if (!1 === this.zf)
                return null;
                void 0 === b && (b = null);
                void 0 === c && (c = null);
                if (Qi(this))
                return null;
                var d = this.Qa, f = 1 / this.dk(), g = this.Ef(), h = g ? a : Qa(t.lc(a.x, a.y), this.transform);
                if (mb( - (5 * f), - (5 * f), d.width + 10 * f, d.height + 10 * f, h.x, h.y)) {
        if (!this.Tg) {
        for (var k = this.xa.length, f = t.K(); k--; ) {
        var l = this.xa.n[k];
                if (l.visible || l === this.kc) {
        l.Ef() ? Qa(f.set(a), l.transform) : f.set(a);
                var m = null;
                l instanceof y ? m = l.ne(f, b, c) : !0 === l.zf && l.Ga(f) && (m = l);
                if (null !== m && (null !== b && (m = b(m)), m && (null ===
                        c || c(m))))
                return t.B(f), g || t.B(h), m
                }
        }
        t.B(f)
                }
        if (null === this.background && null === this.Zk)
                return g || t.B(h), null;
                a = mb(0, 0, d.width, d.height, h.x, h.y) ? this : null;
                g || t.B(h);
                return a
                }
        g || t.B(h);
                return null
                };
        aa.bp = function(a, b, c, d) {
        if (!1 === this.zf)
                return!1;
                void 0 === b && (b = null);
                void 0 === c && (c = null);
                d instanceof B || d instanceof C || (d = new B(Q));
                var f = this.Qa, g = this.Ef(), h = g ? a : Qa(t.lc(a.x, a.y), this.transform);
                if (mb(0, 0, f.width, f.height, h.x, h.y)) {
        if (!this.Tg) {
        for (var k = this.xa.length, f = t.K(); k--; ) {
        var l = this.xa.n[k];
                if (l.visible || l === this.kc)
                l.Ef() ? Qa(f.set(a), l.transform) : f.set(a), (l instanceof y ? l.bp(f, b, c, d) : l.Ga(f)) && !1 !== l.zf && (null !== b && (l = b(l)), l && (null === c || c(l)) && d.add(l))
                }
        t.B(f)
                }
        g || t.B(h);
                return null !==
                this.background || null !== this.Zk
                }
        g || t.B(h);
                return!1
                };
        aa.ak = function(a, b, c, d, f, g) {
        if (!1 === this.zf)
                return!1;
                void 0 === b && (b = null);
                void 0 === c && (c = null);
                var h = g;
                void 0 === g && (h = t.oh(), h.reset());
                h.multiply(this.transform);
                if (this.Hm(a, h))
                return Wl(this, b, c, f), void 0 === g && t.We(h), !0;
                if (this.Qf(a, h)) {
        if (!this.Tg)
                for (var k = this.xa.length; k--; ) {
        var l = this.xa.n[k];
                if (l.visible || l === this.kc) {
        var m = l.pa, n = this.Qa;
                if (!(m.x > n.width || m.y > n.height || 0 > m.x + m.width || 0 > m.y + m.height)) {
        m = t.oh();
                m.set(h);
                if (l instanceof y ? l.ak(a, b, c, d, f, m) : jk(l, a, d, m))
                null !== b && (l = b(l)), l &&
                (null === c || c(l)) && f.add(l);
                t.We(m)
                }
        }
        }
        void 0 === g && t.We(h);
                return d
                }
        void 0 === g && t.We(h);
                return!1
                };
        function Wl(a, b, c, d) {
        for (var f = a.xa.length; f--; ) {
        var g = a.xa.n[f];
                if (g.visible) {
        var h = g.pa, k = a.Qa;
                h.x > k.width || h.y > k.height || 0 > h.x + h.width || 0 > h.y + h.height || (g instanceof y && Wl(g, b, c, d), null !== b && (g = b(g)), g && (null === c || c(g)) && d.add(g))
        }
        }
        }
aa.Pm = function(a, b, c, d, f, g) {
if (!1 === this.zf)
        return!1;
        void 0 === c && (c = null);
        void 0 === d && (d = null);
        var h = this.Qa, k = this.Ef(), l = k ? a : Qa(t.lc(a.x, a.y), this.transform), m = k ? b : Qa(t.lc(b.x, b.y), this.transform), n = l.Zj(m), p = 0 < l.x && l.x < h.width && 0 < l.y && l.y < h.height || Ra(l.x, l.y, 0, 0, 0, h.height) < n || Ra(l.x, l.y, 0, h.height, h.width, h.height) < n || Ra(l.x, l.y, h.width, h.height, h.width, 0) < n || Ra(l.x, l.y, h.width, 0, 0, 0) < n, h = 0 < l.x && l.x < h.width && 0 < l.y && l.y < h.height && Ra(l.x, l.y, 0, 0, 0, h.height) < n && Ra(l.x, l.y, 0, h.height, h.width, h.height) <
        n && Ra(l.x, l.y, h.width, h.height, h.width, 0) < n && Ra(l.x, l.y, h.width, 0, 0, 0) < n;
        k || (t.B(l), t.B(m));
        if (p) {
if (!this.Tg) {
k = t.K();
        l = t.K();
        for (m = this.xa.length; m--; )
        if (n = this.xa.n[m], n.visible || n === this.kc) {
var q = n.pa, r = this.Qa;
        q.x > r.width || q.y > r.height || 0 > q.x + q.width || 0 > q.y + q.height || (n.Ef() ? (q = n.transform, Qa(k.set(a), q), Qa(l.set(b), q)) : (k.set(a), l.set(b)), n instanceof y ? !n.Pm(k, l, c, d, f, g) : !n.AE(k, l, f)) || (null !== c && (n = c(n)), n && (null === d || d(n)) && g.add(n))
        }
t.B(k);
        t.B(l)
        }
return f ? p : h
        }
return!1
        };
        function Il(a) {
        var b = a.G;
                if (void 0 === b || b === xb)
                b = null;
                null === b && a instanceof W && (a = a.Oa, null !== a && (b = a.G));
                null === b && (b = Eb);
                return b
        }
function Jl(a) {
var b = a.H;
        if (void 0 === b || b === xb)
        b = null;
        null === b && a instanceof W && (a = a.Oa, null !== a && (b = a.H));
        null === b && (b = Pb);
        return b
        }
y.prototype.add = y.prototype.add = function(a) {
t.l(a, Q, y, "add:element");
        this.Gd(this.xa.count, a)
        };
        y.prototype.elt = y.prototype.wa = function(a) {
        return this.xa.wa(a)
                };
        y.prototype.insertAt = y.prototype.Gd = function(a, b) {
        b instanceof E && t.m("Cannot add a Part to a Panel: " + b);
                if (this === b || this.dj(b))
                this === b && t.m("Cannot make a Panel contain itself: " + this.toString()), t.m("Cannot make a Panel indirectly contain itself: " + this.toString() + " already contains " + b.toString());
                var c = b.ia;
                null !== c && c !== this && t.m("Cannot add a GraphObject that already belongs to another Panel to this Panel: " + b.toString() + ", already contained by " + c.toString() + ", cannot be shared by this Panel: " +
                        this.toString());
                this.da !== xi || b instanceof W || t.m("Can only add Shapes to a Grid Panel, not: " + b);
                b.wl(this);
                b.km = null;
                if (null !== this.yA) {
        var d = b.data;
                null !== d && "object" === typeof d && (null === this.dg && (this.dg = new ja(Object, y)), this.dg.add(d, b))
                }
        var f = this.xa, d = - 1;
                if (c === this) {
        for (var g = - 1, h = f.count, k = 0; k < h; k++)
                if (f.n[k] === b) {
        g = k;
                break
                }
        if ( - 1 !== g) {
        if (g === a || g + 1 >= f.count && a >= f.count)
                return;
                f.qd(g);
                d = g
                } else
                t.m("element " + b.toString() + " has panel " + c.toString() + " but is not contained by it.")
                }
        if (0 > a ||
                a > f.count)
                a = f.count;
                f.Gd(a, b);
                this.fa();
                b.fa();
                null !== b.Ld ? this.Eh = !0 : b instanceof y && !0 === b.Eh && (this.Eh = !0);
                c = this.S;
                null !== c && (c.Gj = null, c.Dj = NaN, this.Eh && c instanceof S && (c.Eh = !0), c.Eh && (c.Pd = null), f = this.h, null !== f && f.ja.sb || ( - 1 !== d && c.Zc(xd, "elements", this, b, null, d, null), c.Zc(wd, "elements", this, null, b, null, a)))
                };
        y.prototype.remove = y.prototype.remove = function(a) {
        t.l(a, Q, y, "remove:element");
                for (var b = this.xa, c = b.count, d = - 1, f = 0; f < c; f++)
                if (b.n[f] === a) {
        d = f;
                break
                }
        - 1 !== d && this.Xe(d)
                };
        y.prototype.removeAt = y.prototype.qd = function(a) {
        e && t.q(a, y, "removeAt:idx");
                0 <= a && this.Xe(a)
                };
        y.prototype.Xe = function(a) {
        var b = this.xa, c = b.wa(a);
                c.km = null;
                c.wl(null);
                if (null !== this.dg) {
        var d = c.data;
                "object" === typeof d && this.dg.remove(d)
                }
        b.qd(a);
                lk(this, !1);
                this.fa();
                b = this.S;
                null !== b && (b.Gj = null, b.Dj = NaN, d = this.h, null !== d && d.ja.sb || b.Zc(xd, "elements", this, c, null, a, null))
                };
        t.A(y, {lx: "rowCount"}, function() {
        return void 0 === this.jd ? 0 : this.jd.length
                });
        y.prototype.getRowDefinition = y.prototype.pe = function(a) {
        if (void 0 === this.jd)
                return null;
                e && t.q(a, y, "getRowDefinition:idx");
                0 > a && t.la(a, ">= 0", y, "getRowDefinition:idx");
                a = Math.round(a);
                var b = this.jd;
                if (void 0 === b[a]) {
        var c = new Be;
                c.wl(this);
                c.Ul = !0;
                c.Sc = a;
                b[a] = c
                }
        return b[a]
                };
        y.prototype.removeRowDefinition = function(a) {
        if (void 0 !== this.jd) {
        e && t.q(a, y, "removeRowDefinition:idx");
                0 > a && t.la(a, ">= 0", y, "removeRowDefinition:idx");
                a = Math.round(a);
                var b = this.jd;
                b[a] && (b[a] = void 0)
                }
        };
        t.A(y, {iw: "columnCount"}, function() {
        return void 0 === this.cd ? 0 : this.cd.length
                });
        y.prototype.getColumnDefinition = y.prototype.oe = function(a) {
        if (void 0 === this.cd)
                return null;
                e && t.q(a, y, "getColumnDefinition:idx");
                0 > a && t.la(a, ">= 0", y, "getColumnDefinition:idx");
                a = Math.round(a);
                var b = this.cd;
                if (void 0 === b[a]) {
        var c = new Be;
                c.wl(this);
                c.Ul = !1;
                c.Sc = a;
                b[a] = c
                }
        return b[a]
                };
        y.prototype.removeColumnDefinition = function(a) {
        if (void 0 !== this.cd) {
        e && t.q(a, y, "removeColumnDefinition:idx");
                0 > a && t.la(a, ">= 0", y, "removeColumnDefinition:idx");
                a = Math.round(a);
                var b = this.cd;
                b[a] && (b[a] = void 0)
                }
        };
        t.g(y, "rowSizing", y.prototype.aG);
        t.defineProperty(y, {aG: "rowSizing"}, function() {
        return void 0 === this.pm ? Dl : this.pm
                }, function(a) {
        if (void 0 !== this.pm) {
        var b = this.pm;
                b !== a && (a !== Dl && a !== Nl && t.m("rowSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None"), this.pm = a, this.fa(), this.j("rowSizing", b, a))
                }
        });
        t.g(y, "columnSizing", y.prototype.YD);
        t.defineProperty(y, {YD: "columnSizing"}, function() {
        return void 0 === this.Jl ? Dl : this.Jl
                }, function(a) {
        if (void 0 !== this.Jl) {
        var b = this.Jl;
                b !== a && (a !== Dl && a !== Nl && t.m("columnSizing must be RowColumnDefinition.ProportionalExtra or RowColumnDefinition.None"), this.Jl = a, this.fa(), this.j("columnSizing", b, a))
                }
        });
        t.g(y, "topIndex", y.prototype.$J);
        t.defineProperty(y, {$J: "topIndex"}, function() {
        return void 0 === this.Oi ? 0 : this.Oi
                }, function(a) {
        if (void 0 !== this.Oi) {
        var b = this.Oi;
                b !== a && ((!isFinite(a) || 0 > a) && t.m("topIndex must be greater than zero and a real number. Was " + a), this.Oi = a, this.fa(), this.j("topIndex", b, a))
                }
        });
        t.g(y, "leftIndex", y.prototype.fJ);
        t.defineProperty(y, {fJ: "leftIndex"}, function() {
        return void 0 === this.zi ? 0 : this.zi
                }, function(a) {
        if (void 0 !== this.zi) {
        var b = this.zi;
                b !== a && ((!isFinite(a) || 0 > a) && t.m("leftIndex must be greater than zero and a real number. Was " + a), this.zi = a, this.fa(), this.j("leftIndex", b, a))
                }
        });
        y.prototype.findRowForLocalY = function(a) {
        if (0 > a)
                return - 1;
                if (this.type !== Hk)
                return NaN;
                for (var b = 0, c = this.jd, d = c.length, f = this.Oi; f < d; f++) {
        var g = c[f];
                if (void 0 !== g && (b += g.total, a < b))
                return f
                }
        return - 1
                };
        y.prototype.findColumnForLocalX = function(a) {
        if (0 > a)
                return - 1;
                if (this.type !== Hk)
                return NaN;
                for (var b = 0, c = this.cd, d = c.length, f = this.zi; f < d; f++) {
        var g = c[f];
                if (void 0 !== g && (b += g.total, a < b))
                return f
                }
        return - 1
                };
        t.g(y, "data", y.prototype.data);
        t.defineProperty(y, {data: "data"}, function() {
        return this.Ml
                }, function(a) {
        var b = this.Ml;
                if (b !== a) {
        var c = this instanceof E && !(this instanceof Ke);
                c && t.i(a, "object", y, "data");
                Me(this);
                this.Ml = a;
                var d = this.h;
                null !== d && (c ? this instanceof V ? (null !== b && d.zk.remove(b), null !== a && d.zk.add(a, this)) : (null !== b && d.ri.remove(b), null !== a && d.ri.add(a, this)) : (c = this.ia, null !== c && null !== c.dg && (null !== b && c.dg.remove(b), null !== a && c.dg.add(a, this))));
                this.j("data", b, a);
                null !== d && d.ja.sb || null !== a && this.Qb()
                }
        });
        t.g(y, "itemIndex", y.prototype.gF);
        t.defineProperty(y, {gF: "itemIndex"}, function() {
        return this.gr
                }, function(a) {
        var b = this.gr;
                b !== a && (this.gr = a, this.j("itemIndex", b, a))
                });
        function Qk(a) {
        a = a.Hl;
                return null !== a && a.ob
        }
function Me(a) {
var b = a.Hl;
        if (null === b)
        null !== a.data && t.m("Template cannot have .data be non-null: " + a), a.Hl = b = new B(Ee);
        else if (b.ob)
        return;
        var c = new B(Q);
        Ql(a, a, function(a, d) {
        var f = d.Ic;
                if (null !== f) {
        Kk(d, !1);
                for (var g = f.k; g.next(); ) {
        f = g.value;
                f.mode === Ge && Kk(d, !0);
                var h = f.Rt;
                if (null !== h) {
        var q = a;
                "" !== h && (q = a.me(h));
                null !== q && (c.add(q), void 0 === q.qs && (q.qs = new B(Ee)), q.qs.add(f))
                }
        b.add(f)
                }
        }
        if (d instanceof y && d.type === Hk) {
        if (0 < d.jd.length)
                for (g = d.jd, h = g.length, q = 0; q < h; q++) {
        var r = g[q];
                if (void 0 !== r &&
                        null !== r.Ic)
                for (var s = r.Ic.k; s.next(); )
                f = s.value, f.mg = r, f.wz = 2, f.Mv = r.index, b.add(f)
                }
        if (0 < d.cd.length)
                for (g = d.cd, h = g.length, q = 0; q < h; q++)
                if (r = g[q], void 0 !== r && null !== r.Ic)
                for (s = r.Ic.k; s.next(); )
                f = s.value, f.mg = r, f.wz = 1, f.Mv = r.index, b.add(f)
                }
        });
        for (var d = c.k; d.next(); ) {
var f = d.value;
        if (void 0 !== f.qs) {
Kk(f, !0);
        for (var g = f.qs.k; g.next(); ) {
var h = g.value;
        null === f.Ic && (f.Ic = new B(Ee));
        f.Ic.add(h)
        }
}
delete f.qs
        }
for (d = b.k; d.next(); )
        f = d.value, g = f.mg, null !== g && (f.mg = null, g === a ? f.nn = "" : (g instanceof Be && (g = g.ia),
                f.nn = "" !== g.name ? g.name : g.name = "_" + t.od(g)));
        b.freeze();
        a instanceof E && a.Jd() && (ih(a, Infinity, Infinity), a.Jc())
        }
y.prototype.updateTargetBindings = y.prototype.Qb = function(a) {
var b = this.Hl;
        if (null !== b)
        for (void 0 === a && (a = ""), b = b.k; b.next(); ) {
var c = b.value, d = c.fB;
        if ("" === a || "" === d || d === a)
        if (d = c.Tt, null !== c.bE || "" !== d) {
var d = this.data, f = c.Rt;
        null !== f && (d = this.me(f));
        if (null === d)
        e && t.trace("Binding error: missing GraphObject named " + f + " in " + this.toString());
        else {
        var f = this, g = c.nn;
                if ("" !== g) {
        if (f = this.me(g), null === f)
                continue
                } else
                null !== c.mg && (f = c.mg);
                g = c.wz;
                if (0 !== g) {
        if (!(f instanceof y))
                continue;
                1 === g ? f = f.oe(c.Mv) :
                2 === g && (f = f.pe(c.Mv))
                }
        void 0 !== f && c.MG(f, d)
                }
}
}
};
        t.g(y, "itemArray", y.prototype.yA);
        t.defineProperty(y, {yA: "itemArray"}, function() {
        return this.yi
                }, function(a) {
        var b = this.yi;
                if (b !== a) {
        e && null !== a && !t.isArray(a) && t.m("Panel.itemArray must be an Array-like object or null, not: " + a);
                var c = this.h;
                null !== c && null !== b && ej(c, this);
                this.yi = a;
                null !== c && null !== a && bj(c, this);
                this.j("itemArray", b, a);
                null !== c && c.ja.sb || this.RA()
                }
        });
        function Ul(a) {
        return a.type === Tg || a.type === di || a.type === wg
        }
y.prototype.rebuildItemElements = y.prototype.RA = function() {
var a = 0;
        for (Ul(this) && (a = 1); this.xa.length > a; )
        this.Xe(a);
        a = this.yA;
        if (null !== a)
        for (var b = t.vb(a), c = 0; c < b; c++)
        rj(this, t.mb(a, c), c)
        };
        function rj(a, b, c) {
        if (void 0 !== b && null !== b) {
        var d = a.getCategoryForItemData(b, c), d = a.findTemplateForItemData(b, c, d);
                d instanceof y && (Me(d), d = d.copy(), "object" === typeof b && (null === a.dg && (a.dg = new ja(Object, y)), a.dg.add(b, d)), a.type !== Tg && a.type !== di || c++, a.Gd(c, d), Xl(d, c), uj(a, c), d.data = b)
        }
        }
function uj(a, b) {
for (var c = a.xa, d = b + 1; d < c.length; ) {
var f = c.wa(d);
        f instanceof y && Xl(f, d);
        d++
        }
}
function Xl(a, b) {
a.type === tk ? a.rc = b : a.type === uk && (a.column = b);
        a.gF = b
        }
t.g(y, "itemTemplate", y.prototype.aJ);
        t.defineProperty(y, {aJ: "itemTemplate"}, function() {
        return null === this.eg ? null : this.eg.za("")
                }, function(a) {
        if (null === this.eg) {
        if (null === a)
                return;
                this.eg = new ja("string", y)
                }
        var b = this.eg.za("");
                b !== a && (t.l(a, y, y, "itemTemplate"), a instanceof E && t.m("itemTemplate must not be a Part: " + a), this.eg.add("", a), this.j("itemTemplate", b, a), a = this.h, null !== a && a.ja.sb || this.RA())
                });
        t.g(y, "itemTemplateMap", y.prototype.hF);
        t.defineProperty(y, {hF: "itemTemplateMap"}, function() {
        return this.eg
                }, function(a) {
        var b = this.eg;
                if (b !== a) {
        t.l(a, ja, y, "itemTemplateMap");
                for (var c = a.k; c.next(); ) {
        var d = c.value;
                d instanceof E && t.m("Template in itemTemplateMap must not be a Part: " + d)
                }
        this.eg = a;
                this.j("itemTemplateMap", b, a);
                a = this.h;
                null !== a && a.ja.sb || this.RA()
                }
        });
        t.g(y, "itemCategoryProperty", y.prototype.$I);
        t.defineProperty(y, {$I: "itemCategoryProperty"}, function() {
        return this.fo
                }, function(a) {
        var b = this.fo;
                b !== a && ("string" !== typeof a && "function" !== typeof a && t.bc(a, "string or function", y, "itemCategoryProperty"), this.fo = a, this.j("itemCategoryProperty", b, a))
                });
        y.prototype.getCategoryForItemData = function(a) {
        if (null === a)
                return"";
                var b = this.fo;
                if ("function" === typeof b)
                b = b(a);
                else if ("string" === typeof b && "object" === typeof a) {
        if ("" === b)
                return"";
                b = t.hb(a, b)
                } else
                return"";
                if (void 0 === b)
                return"";
                if ("string" === typeof b)
                return b;
                t.m("Panel.getCategoryForItemData found a non-string category for " + a + ": " + b);
                return""
                };
        y.prototype.findTemplateForItemData = function(a, b, c) {
        a = this.hF;
                b = null;
                null !== a && (b = a.za(c));
                null === b && (t.RG || (t.RG = !0, t.trace('No item template Panel found for category "' + c + '" on ' + this), t.trace("  Using default item template."), c = new y, a = new na, a.bind(new Ee("text", "", yd)), c.add(a), t.mE = c), b = t.mE);
                return b instanceof y ? b : null
                };
        t.g(y, "isAtomic", y.prototype.TI);
        t.defineProperty(y, {TI: "isAtomic"}, function() {
        return this.Tg
                }, function(a) {
        var b = this.Tg;
                b !== a && (t.i(a, "boolean", y, "isAtomic"), this.Tg = a, this.j("isAtomic", b, a))
                });
        function Be() {
        t.Ac(this);
                this.Hi = null;
                this.Ul = !0;
                this.Sc = 0;
                this.Jf = NaN;
                this.em = 0;
                this.dm = Infinity;
                this.ue = xb;
                this.Ma = this.Kb = 0;
                this.Ic = null;
                this.ns = Yl;
                this.Oh = Wg;
                this.ks = this.Nj = null;
                this.ls = NaN;
                this.Lb = this.Kh = null;
                this.yq = !1
        }
t.ga("RowColumnDefinition", Be);
        Be.prototype.copy = function() {
        var a = new Be;
                a.Ul = this.Ul;
                a.Sc = this.Sc;
                a.Jf = this.Jf;
                a.em = this.em;
                a.dm = this.dm;
                a.ue = this.ue;
                a.Kb = this.Kb;
                a.Ma = this.Ma;
                a.Oh = this.Oh;
                a.ns = this.ns;
                a.Nj = null === this.Nj ? null : this.Nj.Z();
                a.ks = this.ks;
                a.ls = this.ls;
                a.Kh = null;
                this.Kh && (a.Kh = this.Kh.slice(0));
                a.Lb = this.Lb;
                a.yq = this.yq;
                a.Ic = this.Ic;
                return a
                };
        Be.prototype.toString = function() {
        return"RowColumnDefinition " + (this.ci ? "(Row " : "(Column ") + this.index + ") #" + t.od(this)
                };
        var Yl;
        Be.Default = Yl = t.w(Be, "Default", 0);
        var Nl;
        Be.None = Nl = t.w(Be, "None", 1);
        var Dl;
        Be.ProportionalExtra = Dl = t.w(Be, "ProportionalExtra", 2);
        Be.prototype.wl = function(a) {
        this.Hi = a
                };
        function Ll(a, b) {
        a.Kb = isNaN(a.Jf) ? Math.max(Math.min(a.dm, b), a.em) : Math.max(Math.min(a.dm, a.Jf), a.em)
        }
function Pl(a) {
var b = a.Hi, c = a.hn;
        null === c && (c = a.ci ? b.si : b.uh);
        var d = a.jn;
        isNaN(d) && (d = a.ci ? b.wh : b.vh);
        d = null !== c ? d : 0;
        0 === a.index && (d = 0);
        c = a.$A;
        null === c && (c = b.sj);
        return d + (a.ci ? c.top : c.left)
        }
function Hl(a) {
var b = a.Hi, c = a.hn;
        null === c && (c = a.ci ? b.si : b.uh);
        var d = a.jn;
        isNaN(d) && (d = a.ci ? b.wh : b.vh);
        d = null !== c ? d : 0;
        0 === a.index && (d = 0);
        c = a.$A;
        null === c && (c = b.sj);
        return d + (a.ci ? c.top + c.bottom : c.left + c.right)
        }
Be.prototype.Uc = function(a, b, c, d, f) {
var g = this.Hi;
        if (null !== g) {
g.fa();
        for (var h = this.ci, k = g.xa, l = k.length, m = 0; m < l; m++) {
var n = k.n[m];
        (h ? n.rc : n.column) === this.index && n.fa()
        }
g.Zc(vd, a, this, b, c, d, f);
        if (null !== this.Ic && (b = g.dp(), null !== b && (b = b.data, null !== b)))
        for (c = this.Ic.k; c.next(); )
        c.value.oB(this, b, a, null)
        }
};
        t.A(Be, {ia: "panel"}, function() {
        return this.Hi
                });
        t.A(Be, {ci: "isRow"}, function() {
        return this.Ul
                });
        t.A(Be, {index: "index"}, function() {
        return this.Sc
                });
        t.g(Be, "height", Be.prototype.height);
        t.defineProperty(Be, {height: "height"}, function() {
        return this.Jf
                }, function(a) {
        var b = this.Jf;
                b !== a && (e && t.i(a, "number", Be, "height"), 0 > a && t.la(a, ">= 0", Be, "height"), this.Jf = a, Ll(this, this.Kb), this.Uc("size", b, a))
                });
        t.g(Be, "width", Be.prototype.width);
        t.defineProperty(Be, {width: "width"}, function() {
        return this.Jf
                }, function(a) {
        var b = this.Jf;
                b !== a && (e && t.i(a, "number", Be, "width"), 0 > a && t.la(a, ">= 0", Be, "width"), this.Jf = a, Ll(this, this.Kb), this.Uc("size", b, a))
                });
        t.g(Be, "minimum", Be.prototype.ei);
        t.defineProperty(Be, {ei: "minimum"}, function() {
        return this.em
                }, function(a) {
        var b = this.em;
                b !== a && (e && t.i(a, "number", Be, "minimum"), (0 > a || !isFinite(a)) && t.la(a, ">= 0", Be, "minimum"), this.em = a, Ll(this, this.Kb), this.Uc("minimum", b, a))
                });
        t.g(Be, "maximum", Be.prototype.xf);
        t.defineProperty(Be, {xf: "maximum"}, function() {
        return this.dm
                }, function(a) {
        var b = this.dm;
                b !== a && (e && t.i(a, "number", Be, "maximum"), 0 > a && t.la(a, ">= 0", Be, "maximum"), this.dm = a, Ll(this, this.Kb), this.Uc("maximum", b, a))
                });
        t.g(Be, "alignment", Be.prototype.alignment);
        t.defineProperty(Be, {alignment: "alignment"}, function() {
        return this.ue
                }, function(a) {
        var b = this.ue;
                b.M(a) || (e && t.l(a, I, Be, "alignment"), this.ue = a.Z(), this.Uc("alignment", b, a))
                });
        t.g(Be, "stretch", Be.prototype.gi);
        t.defineProperty(Be, {gi: "stretch"}, function() {
        return this.Oh
                }, function(a) {
        var b = this.Oh;
                b !== a && (e && t.Aa(a, Q, Be, "stretch"), this.Oh = a, this.Uc("stretch", b, a))
                });
        t.g(Be, "separatorPadding", Be.prototype.$A);
        t.defineProperty(Be, {$A: "separatorPadding"}, function() {
        return this.Nj
                }, function(a) {
        "number" === typeof a ? a = new ab(a) : null !== a && e && t.l(a, ab, Be, "separatorPadding");
                var b = this.Nj;
                null !== a && null !== b && b.M(a) || (null !== a && (a = a.Z()), this.Nj = a, this.Uc("separatorPadding", b, a))
                });
        t.g(Be, "separatorStroke", Be.prototype.hn);
        t.defineProperty(Be, {hn: "separatorStroke"}, function() {
        return this.ks
                }, function(a) {
        var b = this.ks;
                b !== a && (null === a || "string" === typeof a || a instanceof fa) && (a instanceof fa && a.freeze(), this.ks = a, this.ia && this.ia.ka(), this.Uc("separatorStroke", b, a))
                });
        t.g(Be, "separatorStrokeWidth", Be.prototype.jn);
        t.defineProperty(Be, {jn: "separatorStrokeWidth"}, function() {
        return this.ls
                }, function(a) {
        var b = this.ls;
                b !== a && (this.ls = a, this.ia && this.ia.ka(), this.Uc("separatorStrokeWidth", b, a))
                });
        t.g(Be, "separatorDashArray", Be.prototype.hG);
        t.defineProperty(Be, {hG: "separatorDashArray"}, function() {
        return this.Kh
                }, function(a) {
        var b = this.Kh;
                b !== a && (Array.isArray(a) || t.bc(a, "Array", Be, "separatorDashArray:val"), this.Kh = a, this.ia && this.ia.ka(), this.Uc("separatorDashArray", b, a))
                });
        t.g(Be, "background", Be.prototype.background);
        t.defineProperty(Be, {background: "background"}, function() {
        return this.Lb
                }, function(a) {
        var b = this.Lb;
                b !== a && (null === a || "string" === typeof a || a instanceof fa) && (a instanceof fa && a.freeze(), this.Lb = a, this.ia && this.ia.ka(), this.Uc("background", b, a))
                });
        t.g(Be, "coversSeparators", Be.prototype.pw);
        t.defineProperty(Be, {pw: "coversSeparators"}, function() {
        return this.yq
                }, function(a) {
        var b = this.yq;
                b !== a && (t.i(a, "boolean", Be, "coversSeparators"), this.yq = a, this.Uc("coversSeparators", b, a))
                });
        t.g(Be, "sizing", Be.prototype.Pt);
        t.defineProperty(Be, {Pt: "sizing"}, function() {
        return this.ns
                }, function(a) {
        var b = this.ns;
                b !== a && (e && t.Aa(a, Be, Be, "sizing"), this.ns = a, this.Uc("sizing", b, a))
                });
        function Ml(a) {
        if (a.Pt === Yl) {
        var b = a.Hi;
                return a.ci ? b.aG : b.YD
        }
        return a.Pt
        }
t.A(Be, {fc: "actual"}, function() {
return this.Kb
        });
        t.A(Be, {total: "total"}, function() {
        return this.Kb + Hl(this)
                });
        t.A(Be, {position: "position"}, function() {
        return this.Ma
                });
        Be.prototype.bind = Be.prototype.bind = function(a) {
        a.mg = this;
                var b = this.ia;
                null !== b && (b = b.dp(), null !== b && Qk(b) && t.m("Cannot add a Binding to a RowColumnDefinition that is already frozen: " + a));
                null === this.Ic && (this.Ic = new B(Ee));
                this.Ic.add(a)
                };
        function W() {
        Q.call(this);
                this.Oa = null;
                this.Qn = "None";
                this.Zg = !1;
                this.Pq = Wg;
                this.xk = null;
                this.Gb = this.Rc = "black";
                this.$g = 1;
                this.Co = "butt";
                this.Do = "miter";
                this.vm = 10;
                this.um = null;
                this.kd = 0;
                this.Mi = this.Li = xb;
                this.Jr = this.Ir = 0;
                this.Uq = !1;
                this.$q = !0;
                this.Lr = null;
                this.Tn = this.Fo = "None";
                this.Tq = 1
        }
t.ga("Shape", W);
        t.Ka(W, Q);
        W.prototype.cloneProtected = function(a) {
        Q.prototype.cloneProtected.call(this, a);
                a.Oa = this.Oa;
                a.Qn = this.Qn;
                a.Zg = this.Zg;
                a.Pq = this.Pq;
                a.xk = this.xk;
                a.Rc = this.Rc;
                a.Gb = this.Gb;
                a.$g = this.$g;
                a.Co = this.Co;
                a.Do = this.Do;
                a.vm = this.vm;
                a.um = null;
                this.um && (a.um = this.um.slice(0));
                a.kd = this.kd;
                a.Li = this.Li.Z();
                a.Mi = this.Mi.Z();
                a.Ir = this.Ir;
                a.Jr = this.Jr;
                a.Uq = this.Uq;
                a.$q = this.$q;
                a.Lr = this.Lr;
                a.Fo = this.Fo;
                a.Tn = this.Tn;
                a.Tq = this.Tq
                };
        W.prototype.toString = function() {
        return"Shape(" + ("None" !== this.zb ? this.zb : "None" !== this.on ? this.on : this.Dw) + ")#" + t.od(this)
                };
        function Zl(a, b, c, d) {
        var f = 0.001, g = d.Ea, h = g.width, g = g.height, k, l, m, n = c.length;
                if (!(2 > n)) {
        k = c[0][0];
                l = c[0][1];
                for (var p, q, r, s, u = 0, v = t.Cb(), D = 1; D < n; D++)
                p = c[D], f = p[0], m = p[1], p = f - k, k = m - l, 0 === p && (p = 0.001), q = k / p, s = Math.atan2(k, p), k = Math.sqrt(p * p + k * k), v.push([p, s, q, k]), u += k, k = f, l = m;
                k = c[0][0];
                l = c[0][1];
                c = 0;
                f = h;
                n = h / 2;
                D = 0 === n ? !1 : !0;
                m = 0;
                r = v[m];
                p = r[0];
                s = r[1];
                q = r[2];
                r = r[3];
                for (var A = 0; 0.1 <= u; ) {
        0 === A && (D ? (f = h, c++, f -= n, u -= n, D = !1) : (f = h, c++), 0 === f && (f = 1));
                if (f > u) {
        t.ya(v);
                return
        }
        f > r ? (A = f - r, f = r) : A = 0;
                var G = Math.sqrt(f *
                        f / (1 + q * q));
                0 > p && (G = - G);
                k += G;
                l += q * G;
                a.translate(k, l);
                a.rotate(s);
                a.translate( - (h / 2), - (g / 2));
                0 === A && d.el(a, b);
                a.translate(h / 2, g / 2);
                a.rotate( - s);
                a.translate( - k, - l);
                u -= f;
                r -= f;
                if (0 !== A) {
        m++;
                if (m === v.length) {
        t.ya(v);
                return
        }
        r = v[m];
                p = r[0];
                s = r[1];
                q = r[2];
                r = r[3];
                f = A
        }
        }
        t.ya(v)
        }
        }
W.prototype.el = function(a, b) {
if (null !== this.Gb || null !== this.Rc) {
null !== this.Rc && xk(this, a, this.Rc, !0);
        null !== this.Gb && xk(this, a, this.Gb, !1);
        var c = this.$g;
        if (0 === c) {
var d = this.S;
        d instanceof Ke && d.type === wg && d.pc instanceof W && (c = d.pc.fb)
        }
a.lineWidth = c;
        a.lineJoin = this.Do;
        a.lineCap = this.Co;
        a.miterLimit = this.vm;
        var f = !1;
        this.S && b.Rk.drawShadows && (f = this.S.fj);
        var g = !0;
        null !== this.Gb && null === this.Rc && (g = !1);
        var d = !1, h = this.wx;
        if (null !== h) {
var k = d = !0;
        void 0 !== a.setLineDash ? (a.setLineDash(h), a.lineDashOffset =
                this.kd) : void 0 !== a.webkitLineDash ? (a.webkitLineDash = h, a.webkitLineDashOffset = this.kd) : void 0 !== a.mozDash ? (a.mozDash = h, a.mozDashOffset = this.kd) : k = !1
        }
var l = this.Oa;
        if (null !== l) {
if (l.da === Dc)
        a.beginPath(), d && !k ? fk(a, l.oc, l.xc, l.kb, l.ub, h, this.kd) : (a.moveTo(l.oc, l.xc), a.lineTo(l.kb, l.ub)), null !== this.Rc && yk(a, this.Rc, !0), 0 !== c && null !== this.Gb && yk(a, this.Gb, !1);
        else if (l.da === Ec) {
var m = l.oc, n = l.xc, p = l.kb, l = l.ub, q = Math.min(m, p), r = Math.min(n, l), m = Math.abs(p - m), n = Math.abs(l - n);
        null !== this.Rc && (this.Rc instanceof
                fa && this.Rc.type === $d ? (a.beginPath(), a.rect(q, r, m, n), yk(a, this.Rc, !0)) : a.fillRect(q, r, m, n));
        if (null !== this.Gb) {
if (g && f) {
var s = [a.shadowOffsetX, a.shadowOffsetY, a.shadowBlur];
        a.shadowOffsetX = 0;
        a.shadowOffsetY = 0;
        a.shadowBlur = 0
        }
d && !k ? (k = [[q, r], [q + m, r], [q + m, r + n], [q, r + n], [q, r]], a.beginPath(), $l(a, k, h, this.kd), yk(a, this.Gb, !1)) : 0 !== c && (this.Gb instanceof fa && this.Gb.type === $d ? (a.beginPath(), a.rect(q, r, m, n), yk(a, this.Gb, !1)) : a.strokeRect(q, r, m, n));
        g && f && (a.shadowOffsetX = s[0], a.shadowOffsetY = s[1], a.shadowBlur =
                s[2])
        }
} else if (l.da === Mc)
        m = l.oc, n = l.xc, p = l.kb, l = l.ub, q = Math.abs(p - m) / 2, r = Math.abs(l - n) / 2, m = Math.min(m, p) + q, n = Math.min(n, l) + r, a.beginPath(), a.moveTo(m, n - r), a.bezierCurveTo(m + H.va * q, n - r, m + q, n - H.va * r, m + q, n), a.bezierCurveTo(m + q, n + H.va * r, m + H.va * q, n + r, m, n + r), a.bezierCurveTo(m - H.va * q, n + r, m - q, n + H.va * r, m - q, n), a.bezierCurveTo(m - q, n - H.va * r, m - H.va * q, n - r, m, n - r), a.closePath(), null !== this.Rc && yk(a, this.Rc, !0), d && !k && (k = t.Cb(), H.ze(m, n - r, m + H.va * q, n - r, m + q, n - H.va * r, m + q, n, 0.5, k), H.ze(m + q, n, m + q, n + H.va * r, m + H.va * q, n + r,
        m, n + r, 0.5, k), H.ze(m, n + r, m - H.va * q, n + r, m - q, n + H.va * r, m - q, n, 0.5, k), H.ze(m - q, n, m - q, n - H.va * r, m - H.va * q, n - r, m, n - r, 0.5, k), a.beginPath(), $l(a, k, h, this.kd), t.ya(k)), 0 !== c && null !== this.Gb && (g && f && (s = [a.shadowOffsetX, a.shadowOffsetY, a.shadowBlur], a.shadowOffsetX = 0, a.shadowOffsetY = 0, a.shadowBlur = 0), yk(a, this.Gb, !1), g && f && (a.shadowOffsetX = s[0], a.shadowOffsetY = s[1], a.shadowBlur = s[2]));
        else if (l.da === Ac) {
for (var q = l.Bk, r = q.length, u = 0; u < r; u++) {
var v = q.n[u];
        a.beginPath();
        a.moveTo(v.qa, v.ra);
        for (var D = v.Fa.n, A = D.length,
                G = null, L = 0; L < A; L++) {
var N = D[L];
        switch (N.da) {
case bd:
        a.moveTo(N.D, N.F);
        break;
        case Oc:
        a.lineTo(N.D, N.F);
        break;
        case cd:
        a.bezierCurveTo(N.hd, N.ye, N.kg, N.lg, N.kb, N.ub);
        break;
        case dd:
        a.quadraticCurveTo(N.hd, N.ye, N.kb, N.ub);
        break;
        case ed:
        if (N.radiusX === N.radiusY)
        G = Math.PI / 180, a.arc(N.hd, N.ye, N.radiusX, N.mh * G, (N.mh + N.hi) * G, 0 > N.hi);
        else
        for (var G = gd(N, v), O = G.length, U = 0; U < O; U++) {
var Y = G[U];
        0 === U && a.lineTo(Y.x1, Y.y1);
        a.bezierCurveTo(Y.x2, Y.y2, Y.ee, Y.fe, Y.Tb, Y.Ub)
        }
break;
        case fd:
        G && G.type === ed ? (G = gd(G, v), G = G[G.length -
                1] || null, null !== G && (m = G.Tb, p = G.Ub)) : (m = G ? G.D : v.qa, p = G ? G.F : v.ra);
        G = hd(N, v, m, p);
        O = G.length;
        for (U = 0; U < O; U++)
        Y = G[U], a.bezierCurveTo(Y.x2, Y.y2, Y.ee, Y.fe, Y.Tb, Y.Ub);
        break;
        default:
        t.m("Segment not of valid type")
        }
N.Gh && a.closePath();
        G = N
        }
f ? v.co ? (!0 === v.Tl && null !== this.Rc ? (yk(a, this.Rc, !0), g = !0) : g = !1, 0 !== c && null !== this.Gb && (g && (s = [a.shadowOffsetX, a.shadowOffsetY, a.shadowBlur], a.shadowOffsetX = 0, a.shadowOffsetY = 0, a.shadowBlur = 0), d && !k || yk(a, this.Gb, !1), g && (a.shadowOffsetX = s[0], a.shadowOffsetY = s[1], a.shadowBlur =
        s[2]))) : (g && (s = [a.shadowOffsetX, a.shadowOffsetY, a.shadowBlur], a.shadowOffsetX = 0, a.shadowOffsetY = 0, a.shadowBlur = 0), !0 === v.Tl && null !== this.Rc && yk(a, this.Rc, !0), 0 !== c && null !== this.Gb && (d && !k || yk(a, this.Gb, !1)), g && (a.shadowOffsetX = s[0], a.shadowOffsetY = s[1], a.shadowBlur = s[2])) : (!0 === v.Tl && null !== this.Rc && yk(a, this.Rc, !0), 0 === c || null === this.Gb || d && !k || yk(a, this.Gb, !1))
        }
if (d && !k)
        for (c = g, s = l.Bk, g = s.length, k = 0; k < g; k++) {
l = s.n[k];
        a.beginPath();
        m = t.Cb();
        m.push([l.qa, l.ra]);
        p = l.qa;
        q = l.ra;
        r = p;
        u = q;
        v = l.Fa.n;
        D = v.length;
        for (A = 0; A < D; A++) {
L = v[A];
        switch (L.da) {
case bd:
        $l(a, m, h, this.kd);
        m.length = 0;
        m.push([L.D, L.F]);
        p = L.D;
        q = L.F;
        r = p;
        u = q;
        break;
        case Oc:
        m.push([L.D, L.F]);
        p = L.D;
        q = L.F;
        break;
        case cd:
        H.ze(p, q, L.hd, L.ye, L.kg, L.lg, L.kb, L.ub, 0.5, m);
        p = L.D;
        q = L.F;
        break;
        case dd:
        H.Ip(p, q, L.hd, L.ye, L.kb, L.ub, 0.5, m);
        p = L.D;
        q = L.F;
        break;
        case ed:
        N = gd(L, l);
        G = N.length;
        for (O = 0; O < G; O++)
        U = N[O], H.ze(p, q, U.x2, U.y2, U.ee, U.fe, U.Tb, U.Ub, 0.5, m), p = U.Tb, q = U.Ub;
        break;
        case fd:
        N = hd(L, l, p, q);
        G = N.length;
        for (O = 0; O < G; O++)
        U = N[O], H.ze(p, q, U.x2, U.y2, U.ee, U.fe, U.Tb,
        U.Ub, 0.5, m), p = U.Tb, q = U.Ub;
        break;
        default:
        t.m("Segment not of valid type")
        }
L.Gh && (m.push([r, u]), $l(a, m, h, this.kd))
        }
$l(a, m, h, this.kd);
        t.ya(m);
        null !== this.Gb && (c && f && (n = [a.shadowOffsetX, a.shadowOffsetY, a.shadowBlur], a.shadowOffsetX = 0, a.shadowOffsetY = 0, a.shadowBlur = 0), yk(a, this.Gb, !1), c && f && (a.shadowOffsetX = n[0], a.shadowOffsetY = n[1], a.shadowBlur = n[2]))
        }
}
d && (void 0 !== a.setLineDash ? (a.setLineDash(t.ji), a.lineDashOffset = 0) : void 0 !== a.webkitLineDash ? (a.webkitLineDash = t.ji, a.webkitLineDashOffset = 0) : void 0 !==
        a.mozDash && (a.mozDash = null, a.mozDashOffset = 0));
        if (this.LA) {
d = this.LA;
        ih(d, Infinity, Infinity);
        h = d.Ea;
        d.Jc(0, 0, h.width, h.height);
        a.save();
        h = this.nd.Ab.$a();
        a.beginPath();
        n = t.Cb();
        n.push([h.qa, h.ra]);
        c = h.qa;
        f = h.ra;
        s = c;
        g = f;
        k = h.Fa.n;
        l = k.length;
        for (m = 0; m < l; m++) {
p = k[m];
        switch (p.da) {
case bd:
        Zl(a, b, n, d);
        n.length = 0;
        n.push([p.D, p.F]);
        c = p.D;
        f = p.F;
        s = c;
        g = f;
        break;
        case Oc:
        n.push([p.D, p.F]);
        c = p.D;
        f = p.F;
        break;
        case cd:
        H.ze(c, f, p.hd, p.ye, p.kg, p.lg, p.kb, p.ub, 0.5, n);
        c = p.D;
        f = p.F;
        break;
        case dd:
        H.Ip(c, f, p.hd, p.ye, p.kb, p.ub,
                0.5, n);
        c = p.D;
        f = p.F;
        break;
        case ed:
        q = gd(p, h);
        r = q.length;
        for (u = 0; u < r; u++)
        v = q[u], H.ze(c, f, v.x2, v.y2, v.ee, v.fe, v.Tb, v.Ub, 0.5, n), c = v.Tb, f = v.Ub;
        break;
        case fd:
        q = hd(p, h, c, f);
        r = q.length;
        for (u = 0; u < r; u++)
        v = q[u], H.ze(c, f, v.x2, v.y2, v.ee, v.fe, v.Tb, v.Ub, 0.5, n), c = v.Tb, f = v.Ub;
        break;
        default:
        t.m("Segment not of valid type")
        }
p.Gh && (n.push([s, g]), Zl(a, b, n, d))
        }
Zl(a, b, n, d);
        t.ya(n);
        a.restore()
        }
}
}
};
        function $l(a, b, c, d) {
        var f = 0.001, g = c.length, h, k, l, m = b.length;
                if (!(2 > m))
                if (h = b[0][0], k = b[0][1], 2 === m)
                fk(a, h, k, b[1][0], b[1][1], c, d);
                else {
                a.moveTo(h, k);
                        for (var n, p, q, r = 0, s = t.Cb(), u = 1; u < m; u++)
                        n = b[u], f = n[0], l = n[1], n = f - h, h = l - k, 0 === n && (n = 0.001), p = h / n, h = Math.sqrt(n * n + h * h), s.push([n, p, h]), r += h, h = f, k = l;
                        h = b[0][0];
                        k = b[0][1];
                        b = 0;
                        m = !0;
                        f = c[b % g];
                        u = 0 !== d;
                        l = 0;
                        q = s[l];
                        n = q[0];
                        p = q[1];
                        q = q[2];
                        for (var v = 0; 0.1 <= r; ) {
                0 === v && (f = c[b % g], b++, u && (d %= f, f -= d, u = !1));
                        f > r && (f = r);
                        f > q ? (v = f - q, f = q) : v = 0;
                        var D = Math.sqrt(f * f / (1 + p * p));
                        0 > n && (D =
                                - D);
                        h += D;
                        k += p * D;
                        m ? a.lineTo(h, k) : a.moveTo(h, k);
                        r -= f;
                        q -= f;
                        if (0 !== v) {
                l++;
                        if (l === s.length) {
                t.ya(s);
                        return
                }
                q = s[l];
                        n = q[0];
                        p = q[1];
                        q = q[2];
                        f = v
                } else
                        m = !m
                }
                t.ya(s)
                }
        }
W.prototype.getDocumentPoint = W.prototype.qb = function(a, b) {
void 0 === b && (b = new w);
        a.Ge() && t.m("getDocumentPoint:s Spot must be real: " + a.toString());
        var c = this.Qa, d = this.fb;
        b.p(a.x * (c.width + d) - d / 2 + c.x + a.offsetX, a.y * (c.height + d) - d / 2 + c.y + a.offsetY);
        this.ke.Ta(b);
        return b
        };
        W.prototype.Vj = function(a, b) {
        var c = this.Oa;
                if (null === c || null === this.fill && null === this.stroke)
                return!1;
                var d = c.Ob, f = this.fb / 2; c.type !== Dc || b || (f += 2); var g = t.Df(); g.assign(d); g.Pf(f + 2, f + 2); if (!g.Ga(a))return t.hc(g), !1; d = f + 1E-4; if (c.type === Dc){if (null === this.stroke)return!1; d = (c.D - c.qa) * (a.x - c.qa) + (c.F - c.ra) * (a.y - c.ra); if (0 > (c.qa - c.D) * (a.x - c.D) + (c.ra - c.F) * (a.y - c.F) || 0 > d)return!1; t.hc(g); return H.Kd(c.qa, c.ra, c.D, c.F, f, a.x, a.y)}if (c.type === Ec){var h = c.qa, k = c.ra, l = c.D, m = c.F, c = Math.min(h, l), n = Math.min(k,
                m), h = Math.abs(l - h), k = Math.abs(m - k); g.x = c; g.y = n; g.width = h; g.height = k; if (null === this.fill){g.Pf( - d, - d); if (g.Ga(a))return t.hc(g), !1; g.Pf(d, d)}null !== this.stroke && g.Pf(f, f); f = g.Ga(a); t.hc(g); return f}if (c.type === Mc){h = c.qa; k = c.ra; l = c.D; m = c.F; c = Math.min(h, l); n = Math.min(k, m); h = Math.abs(l - h); k = Math.abs(m - k); h /= 2; k /= 2; c = a.x - (c + h); n = a.y - (n + k); if (null === this.fill){h -= d; k -= d; if (0 >= h || 0 >= k || 1 >= c * c / (h * h) + n * n / (k * k))return t.hc(g), !1; h += d; k += d}null !== this.stroke && (h += f, k += f); t.hc(g); return 0 >= h || 0 >= k?!1:1 >= c * c /
                (h * h) + n * n / (k * k)}if (c.type === Ac)return t.hc(g), null === this.fill?kd(c, a.x, a.y, f):c.Ga(a, f, 1 < this.fb, b); t.m("Unknown Geometry type"); return!1};
        W.prototype.tt = function(a, b, c, d){var f = this.Ca, g = this.$g; a = Math.max(a, 0); b = Math.max(b, 0); var h; if (this.Zg)h = this.Oa.Ob; else{var k = this.zb, l = H.NA[k]; if (void 0 === l){var m = H.aj[k]; "string" === typeof m && (m = H.aj[m]); "function" === typeof m?(l = m(null, 100, 100), H.NA[k] = l):t.m("Unsupported Figure:" + k)}h = l.Ob}var k = h.width, l = h.height, m = h.width, n = h.height; switch (kk(this)){case Vg:d = c = 0; break; case Cc:m = Math.max(a - g, 0); n = Math.max(b - g, 0); break; case ck:m = Math.max(a - g, 0); d = 0; break; case bk:c = 0, n = Math.max(b - g, 0)}isFinite(f.width) &&
                (m = f.width); isFinite(f.height) && (n = f.height); f = this.He; h = this.Rf; c = Math.max(c, h.width) - g; d = Math.max(d, h.height) - g; m = Math.min(f.width, m); n = Math.min(f.height, n); m = isFinite(m)?Math.max(c, m):Math.max(k, c); n = isFinite(n)?Math.max(d, n):Math.max(l, d); c = Kl(this); switch (c){case Vg:break; case Cc:k = m; l = n; break; case Xg:c = Math.min(m / k, n / l); isFinite(c) || (c = 1); k *= c; l *= c; break; default:t.m(c + " is not a valid geometryStretch.")}if (this.Zg){h = this.nd; d = k; f = l; c = h.copy(); h = h.Ob; d /= h.width; f /= h.height; isFinite(d) || (d = 1);
                isFinite(f) || (f = 1); if (1 !== d || 1 !== f)switch (c.type){case Dc:case Ec:case Mc:c.qa *= d; c.ra *= f; c.D *= d; c.F *= f; break; case Ac:h = c.Ab; for (var p = h.length, q = 0; q < p; q++){var r = h.n[q]; r.qa *= d; r.ra *= f; for (var r = r.Fa, s = r.length, u = 0; u < s; u++){var v = r.n[u]; switch (v.type){case Oc:case bd:v.D *= d; v.F *= f; break; case cd:v.Bb *= d; v.Rb *= f; v.se *= d; v.te *= f; v.D *= d; v.F *= f; break; case dd:v.Bb *= d; v.Rb *= f; v.D *= d; v.F *= f; break; case ed:v.Da *= d; v.Pa *= f; v.radiusX *= d; void 0 !== v.radiusY && (v.radiusY *= f); break; case fd:v.D *= d; v.F *= f; v.radiusX *=
                d; v.radiusY *= f; break; default:t.m("Unknown Segment type: " + v.type)}}}}this.Oa = c} else if (null === this.Oa || this.Oa.ao !== a - g || this.Oa.$n !== b - g)this.Oa = H.makeGeometry(this, k, l); h = this.Oa.Ob; Infinity === a || Infinity === b?hk(this, h.x - g / 2, h.y - g / 2, 0 === a && 0 === k?0:h.width + g, 0 === b && 0 === l?0:h.height + g):hk(this, - (g / 2), - (g / 2), m + g, n + g)};
        function Ol(a, b, c){if (!1 !== Pi(a)){a.Tc.La(); var d = a.$g; if (0 === d){var f = a.S; f instanceof Ke && f.type === wg && f.pc instanceof W && (d = f.pc.fb)}d *= a.nc; hk(a, - (d / 2), - (d / 2), b + d, c + d); b = a.Tc; c = a.He; d = a.Rf; b.width = Math.min(c.width, b.width); b.height = Math.min(c.height, b.height); b.width = Math.max(d.width, b.width); b.height = Math.max(d.height, b.height); a.Tc.freeze(); a.Tc.N() || t.m("Non-real measuredBounds has been set. Object " + a + ", measuredBounds: " + a.Tc.toString()); lk(a, !1)}}
function Kl(a){var b = a.Ew; return a.Zg?b === Wg?Cc:b:b === Wg?H.NA[a.zb].wc:b}W.prototype.Uj = function(a, b, c, d){ok(this, a, b, c, d)}; W.prototype.getNearestIntersectionPoint = W.prototype.kl = function(a, b, c){return this.jp(a.x, a.y, b.x, b.y, c)};
        W.prototype.jp = function(a, b, c, d, f){var g = this.transform, h = 1 / (g.m11 * g.m22 - g.m12 * g.m21), k = g.m22 * h, l = - g.m12 * h, m = - g.m21 * h, n = g.m11 * h, p = h * (g.m21 * g.dy - g.m22 * g.dx), q = h * (g.m12 * g.dx - g.m11 * g.dy), g = a * k + b * m + p, h = a * l + b * n + q, k = c * k + d * m + p, l = c * l + d * n + q, m = this.fb / 2, p = this.Oa; null === p && (ih(this, Infinity, Infinity), p = this.Oa); q = p.Ob; n = !1; if (p.type === Dc)if (1.5 >= this.fb)n = H.ih(p.oc, p.xc, p.kb, p.ub, g, h, k, l, f); else{var r, s; p.oc === p.kb?(r = m, s = 0):(b = (p.ub - p.xc) / (p.kb - p.oc), s = m / Math.sqrt(1 + b * b), r = s * b); d = t.Cb(); b = new w; H.ih(p.oc +
                r, p.xc + s, p.kb + r, p.ub + s, g, h, k, l, b) && d.push(b); b = new w; H.ih(p.oc - r, p.xc - s, p.kb - r, p.ub - s, g, h, k, l, b) && d.push(b); b = new w; H.ih(p.oc + r, p.xc + s, p.oc - r, p.xc - s, g, h, k, l, b) && d.push(b); b = new w; H.ih(p.kb + r, p.ub + s, p.kb - r, p.ub - s, g, h, k, l, b) && d.push(b); b = d.length; if (0 === b)return t.ya(d), !1; n = !0; s = Infinity; for (r = 0; r < b; r++){var k = d[r], u = (k.x - g) * (k.x - g) + (k.y - h) * (k.y - h); u < s && (s = u, f.x = k.x, f.y = k.y)}t.ya(d)} else if (p.type === Ec)b = q.x - m, n = H.kl(b, q.y - m, q.x + q.width + m, q.y + q.height + m, g, h, k, l, f); else if (p.type === Mc)a:if (b = q.copy().Pf(m,
                m), 0 === b.width)n = H.ih(b.x, b.y, b.x, b.y + b.height, g, h, k, l, f); else if (0 === b.height)n = H.ih(b.x, b.y, b.x + b.width, b.y, g, h, k, l, f); else{a = b.width / 2; var v = b.height / 2; d = b.x + a; b = b.y + v; c = 9999; g !== k && (c = (h - l) / (g - k)); if (9999 > Math.abs(c)){n = h - b - c * (g - d); if (0 > a * a * c * c + v * v - n * n){f.x = NaN; f.y = NaN; n = !1; break a}m = Math.sqrt(a * a * c * c + v * v - n * n); k = ( - (a * a * c * n) + a * v * m) / (v * v + a * a * c * c) + d; a = ( - (a * a * c * n) - a * v * m) / (v * v + a * a * c * c) + d; l = c * (k - d) + n + b; b = c * (a - d) + n + b; d = Math.abs((g - k) * (g - k)) + Math.abs((h - l) * (h - l)); h = Math.abs((g - a) * (g - a)) + Math.abs((h - b) *
                (h - b)); d < h?(f.x = k, f.y = l):(f.x = a, f.y = b)} else{k = v * v; l = g - d; k -= k / (a * a) * l * l; if (0 > k){f.x = NaN; f.y = NaN; n = !1; break a}m = Math.sqrt(k); l = b + m; b -= m; d = Math.abs(l - h); h = Math.abs(b - h); d < h?(f.x = g, f.y = l):(f.x = g, f.y = b)}n = !0} else if (p.type === Ac){var D, A, G, q = t.K(); r = k - g; s = l - h; s = r * r + s * s; f.x = k; f.y = l; for (r = 0; r < p.Ab.count; r++){var L = p.Ab.n[r], N = L.Fa; D = L.qa; A = L.ra; for (var O = D, U = A, Y, ba, R = 0; R < N.count; R++){Y = N.n[R]; ba = Y.type; u = Y.D; G = Y.F; var xa = !1; switch (ba){case bd:O = u; U = G; break; case Oc:xa = am(D, A, u, G, g, h, k, l, q); break; case cd:xa =
                Y.Bb; ba = Y.Rb; var Ya = Y.se, za = Y.te, xa = H.Ps(D, A, xa, ba, Ya, za, u, G, g, h, k, l, 0.5, q); break; case dd:xa = (D + 2 * Y.Bb) / 3; ba = (A + 2 * Y.Rb) / 3; Ya = (2 * Y.Bb + u) / 3; za = (2 * Y.Bb + u) / 3; xa = H.Ps(D, A, xa, ba, Ya, za, u, G, g, h, k, l, 0.5, q); break; case ed:case fd:G = Y.type === ed?gd(Y, L):hd(Y, L, D, A); ba = G.length; for (Ya = 0; Ya < ba; Ya++)v = G[Ya], 0 === Ya && am(D, A, v.x1, v.y1, g, h, k, l, q) && (u = bm(g, h, q, s, f), u < s && (s = u, n = !0)), H.Ps(v.x1, v.y1, v.x2, v.y2, v.ee, v.fe, v.Tb, v.Ub, g, h, k, l, 0.5, q) && (u = bm(g, h, q, s, f), u < s && (s = u, n = !0)); u = v.Tb; G = v.Ub; break; default:t.m("Unknown Segment type: " +
                Y.type)}D = u; A = G; xa && (u = bm(g, h, q, s, f), u < s && (s = u, n = !0)); Y.nt && (u = O, G = U, am(D, A, u, G, g, h, k, l, q) && (u = bm(g, h, q, s, f), u < s && (s = u, n = !0)))}}g = c - a; h = d - b; b = Math.sqrt(g * g + h * h); 0 !== b && (g /= b, h /= b); f.x -= g * m; f.y -= h * m; t.B(q)} else t.m("Invalid Geometry type"); if (!n)return!1; this.transform.Ta(f); return!0}; function bm(a, b, c, d, f){a = c.x - a; b = c.y - b; b = a * a + b * b; return b < d?(f.x = c.x, f.y = c.y, b):d}
function am(a, b, c, d, f, g, h, k, l){var m = !1, n = (f - h) * (b - d) - (g - k) * (a - c); if (0 === n)return!1; l.x = ((f * k - g * h) * (a - c) - (f - h) * (a * d - b * c)) / n; l.y = ((f * k - g * h) * (b - d) - (g - k) * (a * d - b * c)) / n; (a > c?a - c:c - a) < (b > d?b - d:d - b)?(f = b < d?b:d, a = b < d?d:b, (l.y > f || H.nb(l.y, f)) && (l.y < a || H.nb(l.y, a)) && (m = !0)):(f = a < c?a:c, a = a < c?c:a, (l.x > f || H.nb(l.x, f)) && (l.x < a || H.nb(l.x, a)) && (m = !0)); return m}
W.prototype.containedInRect = W.prototype.Hm = function(a, b){if (void 0 === b)return a.Wj(this.pa); var c = this.Oa; null === c && (ih(this, Infinity, Infinity), c = this.Oa); var c = c.Ob, d = this.fb / 2, f = !1, g = t.K(); g.p(c.x - d, c.y - d); a.Ga(b.Ta(g)) && (g.p(c.x - d, c.bottom + d), a.Ga(b.Ta(g)) && (g.p(c.right + d, c.bottom + d), a.Ga(b.Ta(g)) && (g.p(c.right + d, c.y - d), a.Ga(b.Ta(g)) && (f = !0)))); t.B(g); return f};
        W.prototype.intersectsRect = W.prototype.Qf = function(a, b){if (this.Hm(a, b) || void 0 === b && (b = this.transform, a.Wj(this.pa)))return!0; var c = t.oh(); c.set(b); c.nA(); var d = a.left, f = a.right, g = a.top, h = a.bottom, k = t.K(); k.p(d, g); c.Ta(k); if (this.Vj(k, !0))return t.B(k), !0; k.p(f, g); c.Ta(k); if (this.Vj(k, !0))return t.B(k), !0; k.p(d, h); c.Ta(k); if (this.Vj(k, !0))return t.B(k), !0; k.p(f, h); c.Ta(k); if (this.Vj(k, !0))return t.B(k), !0; var l = t.K(), m = t.K(); c.set(b); c.CF(this.transform); c.nA(); l.x = f; l.y = g; l.transform(c); k.x = d; k.y =
                g; k.transform(c); var n = !1; cm(this, k, l, m)?n = !0:(k.x = f, k.y = h, k.transform(c), cm(this, k, l, m)?n = !0:(l.x = d, l.y = h, l.transform(c), cm(this, k, l, m)?n = !0:(k.x = d, k.y = g, k.transform(c), cm(this, k, l, m) && (n = !0)))); t.B(k); t.We(c); t.B(l); t.B(m); return n}; function cm(a, b, c, d){if (!a.kl(b, c, d))return!1; a = b.x; b = b.y; var f = c.x, g = c.y; c = d.x; d = d.y; if (a === f){var h; b < g?(h = b, a = g):(h = g, a = b); return d >= h && d <= a}a < f?(h = a, a = f):h = f; return c >= h && c <= a}
W.prototype.AE = function(a, b, c){function d(a, b){for (var c = a.length, d = 0; d < c; d++){var g = a[d]; if (b.Ys(g[0], g[1]) > f)return!0}return!1}if (c && null !== this.fill && this.Vj(a, !0))return!0; var f = a.Zj(b); b = f; 1.5 < this.fb && (f = this.fb / 2 + Math.sqrt(f), f *= f); var g = this.Oa; null === g && (ih(this, Infinity, Infinity), g = this.Oa); if (!c){var h = g.Ob, k = h.x, l = h.y, m = h.x + h.width, h = h.y + h.height; if (Sa(a.x, a.y, k, l) <= f && Sa(a.x, a.y, m, l) <= f && Sa(a.x, a.y, k, h) <= f && Sa(a.x, a.y, m, h) <= f)return!0}k = g.oc; l = g.xc; m = g.kb; h = g.ub; if (g.type === Dc){if (c =
        Ra(a.x, a.y, k, l, m, h), g = (k - m) * (a.x - m) + (l - h) * (a.y - h), c <= (0 <= (m - k) * (a.x - k) + (h - l) * (a.y - l) && 0 <= g?f:b))return!0} else{if (g.type === Ec)return b = !1, c && (b = Ra(a.x, a.y, k, l, k, h) <= f || Ra(a.x, a.y, k, l, m, l) <= f || Ra(a.x, a.y, m, l, m, h) <= f || Ra(a.x, a.y, k, h, m, h) <= f), b; if (g.type === Mc){b = a.x - (k + m) / 2; var g = a.y - (l + h) / 2, n = Math.abs(m - k) / 2, p = Math.abs(h - l) / 2; if (0 === n || 0 === p)return c = Ra(a.x, a.y, k, l, m, h), c <= f?!0:!1; if (c){if (a = H.wI(n, p, b, g), a * a <= f)return!0} else return Sa(b, g, - n, 0) >= f || Sa(b, g, 0, - p) >= f || Sa(b, g, 0, p) >= f || Sa(b, g, n, 0) >= f?!1:
        !0} else if (g.type === Ac){h = g.Ob; k = h.x; l = h.y; m = h.x + h.width; h = h.y + h.height; if (a.x > m && a.x < k && a.y > h && a.y < l && Ra(a.x, a.y, k, l, k, h) > f && Ra(a.x, a.y, k, l, m, l) > f && Ra(a.x, a.y, m, h, k, h) > f && Ra(a.x, a.y, m, h, m, l) > f)return!1; b = Math.sqrt(f); if (c){if (null === this.fill?kd(g, a.x, a.y, b):g.Ga(a, b, !0))return!0} else{c = g.Ab; for (b = 0; b < c.count; b++){k = c.n[b]; n = k.qa; p = k.ra; if (a.Ys(n, p) > f)return!1; l = k.Fa.n; m = l.length; for (h = 0; h < m; h++){var q = l[h]; switch (q.type){case bd:case Oc:n = q.D; p = q.F; if (a.Ys(n, p) > f)return!1; break; case cd:g = t.Cb();
        H.ze(n, p, q.Bb, q.Rb, q.se, q.te, q.D, q.F, 0.8, g); n = d(g, a); t.ya(g); if (n)return!1; n = q.D; p = q.F; if (a.Ys(n, p) > f)return!1; break; case dd:g = t.Cb(); H.Ip(n, p, q.Bb, q.Rb, q.D, q.F, 0.8, g); n = d(g, a); t.ya(g); if (n)return!1; n = q.D; p = q.F; if (a.Ys(n, p) > f)return!1; break; case ed:case fd:var q = q.type === ed?gd(q, k):hd(q, k, n, p), r = q.length, s = null, g = t.Cb(); for (b = 0; b < r; b++)if (s = q[b], g.length = 0, H.ze(s.x1, s.y1, s.x2, s.y2, s.ee, s.fe, s.Tb, s.Ub, 0.8, g), d(g, a))return t.ya(g), !1; t.ya(g); null !== s && (n = s.Tb, p = s.Ub); break; default:t.m("Unknown Segment type: " +
        q.type)}}}return!0}}}return!1}; t.g(W, "geometry", W.prototype.nd); t.defineProperty(W, {nd:"geometry"}, function(){return this.xk?this.xk:this.Oa}, function(a){var b = this.Oa; if (b !== a){null !== a?(e && t.l(a, zc, W, "geometry"), this.xk = this.Oa = a.freeze()):this.xk = this.Oa = null; var c = this.S; c && (c.Dj = NaN); this.Zg = !0; this.fa(); this.j("geometry", b, a)}}); t.g(W, "geometryString", W.prototype.HE);
        t.defineProperty(W, {HE:"geometryString"}, function(){return this.nd.toString()}, function(a){var b = Rc(a); a = b.normalize(); this.nd = b; var b = t.K(), c = this.position; c.N()?b.p(c.x - a.x, c.y - a.y):b.p( - a.x, - a.y); this.position = b; t.B(b)}); t.defineProperty(W, {rA:"isGeometryPositioned"}, function(){return this.Uq}, function(a){e && t.i(a, "boolean", W, "isGeometryPositioned"); var b = this.Uq; b !== a && (this.Uq = a, this.fa(), this.j("isGeometryPositioned", b, a))}); W.prototype.Ye = function(){this.Zg?this.xk = null:this.Oa = null; this.fa()};
        t.g(W, "fill", W.prototype.fill); t.defineProperty(W, {fill:"fill"}, function(){return this.Rc}, function(a){var b = this.Rc; b !== a && (e && null !== a && t.To(a, "Shape.fill"), a instanceof fa && a.freeze(), this.Rc = a, this.ka(), this.j("fill", b, a))}); t.g(W, "stroke", W.prototype.stroke); t.defineProperty(W, {stroke:"stroke"}, function(){return this.Gb}, function(a){var b = this.Gb; b !== a && (e && null !== a && t.To(a, "Shape.stroke"), a instanceof fa && a.freeze(), this.Gb = a, this.ka(), this.j("stroke", b, a))}); t.g(W, "strokeWidth", W.prototype.fb);
        t.defineProperty(W, {fb:"strokeWidth"}, function(){return this.$g}, function(a){var b = this.$g; if (b !== a)if (e && t.q(a, W, "strokeWidth"), 0 <= a){this.$g = a; this.fa(); var c = this.S; c && (c.Dj = NaN); this.j("strokeWidth", b, a)} else t.la(a, "val >= 0", W, "strokeWidth:val")}); t.g(W, "strokeCap", W.prototype.tG);
        t.defineProperty(W, {tG:"strokeCap"}, function(){return this.Co}, function(a){var b = this.Co; b !== a && ("string" !== typeof a || "butt" !== a && "round" !== a && "square" !== a?t.la(a, '"butt", "round", or "square"', W, "strokeCap"):(this.Co = a, this.ka(), this.j("strokeCap", b, a)))}); t.g(W, "strokeJoin", W.prototype.TJ);
        t.defineProperty(W, {TJ:"strokeJoin"}, function(){return this.Do}, function(a){var b = this.Do; b !== a && ("string" !== typeof a || "miter" !== a && "bevel" !== a && "round" !== a?t.la(a, '"miter", "bevel", or "round"', W, "strokeJoin"):(this.Do = a, this.ka(), this.j("strokeJoin", b, a)))}); t.g(W, "strokeMiterLimit", W.prototype.UJ);
        t.defineProperty(W, {UJ:"strokeMiterLimit"}, function(){return this.vm}, function(a){var b = this.vm; if (b !== a)if (e && t.q(a, W, "strokeMiterLimit"), 0 < a){this.vm = a; this.ka(); var c = this.S; c && (c.Dj = NaN); this.j("strokeMiterLimit", b, a)} else t.la(a, "val > 0", W, "strokeWidth:val")}); t.g(W, "strokeDashArray", W.prototype.wx);
        t.defineProperty(W, {wx:"strokeDashArray"}, function(){return this.um}, function(a){var b = this.um; if (b !== a){null === a || Array.isArray(a) || t.bc(a, "Array", W, "strokeDashArray:val"); if (null !== a)for (var c = a.length, d = 0; d < c; d++){var f = a[d]; ("number" !== typeof f || isNaN(f) || 0 > f || !isFinite(f)) && t.m("strokeDashArray:val " + f + " is a negative number or not a real number.")}this.um = a; this.ka(); this.j("strokeDashArray", b, a)}}); t.g(W, "strokeDashOffset", W.prototype.uG);
        t.defineProperty(W, {uG:"strokeDashOffset"}, function(){return this.kd}, function(a){var b = this.kd; b !== a && (e && t.q(a, W, "strokeDashOffset"), 0 <= a && (this.kd = a, this.ka(), this.j("strokeDashOffset", b, a)))}); t.g(W, "figure", W.prototype.zb);
        t.defineProperty(W, {zb:"figure"}, function(){return this.Qn}, function(a){var b = this.Qn; if (b !== a){e && t.i(a, "string", W, "figure"); var c = H.aj[a]; "function" === typeof c?c = a:(c = H.aj[a.toLowerCase()]) || t.m("Unknown Shape.figure: " + a); if (b !== c){if (a = this.S)a.Dj = NaN; this.Qn = c; this.Zg = !1; this.Ye(); this.j("figure", b, c)}}}); t.g(W, "toArrow", W.prototype.on);
        t.defineProperty(W, {on:"toArrow"}, function(){return this.Fo}, function(a){var b = this.Fo; !0 === a?a = "Standard":!1 === a && (a = ""); if (b !== a){e && t.i(a, "string", W, "toArrow"); var c = H.RD(a); null === c?t.m("Unknown Shape.toArrow: " + a):b !== c && (this.Fo = c, this.Zg = !1, this.Ye(), dm(this), this.j("toArrow", b, c))}}); t.g(W, "fromArrow", W.prototype.Dw);
        t.defineProperty(W, {Dw:"fromArrow"}, function(){return this.Tn}, function(a){var b = this.Tn; !0 === a?a = "Standard":!1 === a && (a = ""); if (b !== a){e && t.i(a, "string", W, "fromArrow"); var c = H.RD(a); null === c?t.m("Unknown Shape.fromArrow: " + a):b !== c && (this.Tn = c, this.Zg = !1, this.Ye(), dm(this), this.j("fromArrow", b, c))}}); function dm(a){var b = a.h; null !== b && b.ja.sb || (a.Lt = em, "None" !== a.Fo?(a.Af = - 1, a.Rj = Vb):"None" !== a.Tn && (a.Af = 0, a.Rj = new I(1 - Vb.x, Vb.y)))}
t.defineProperty(W, {G:"spot1"}, function(){return this.Li}, function(a){t.l(a, I, W, "spot1"); var b = this.Li; b.M(a) || (this.Li = a = a.Z(), this.fa(), this.j("spot1", b, a))}); t.defineProperty(W, {H:"spot2"}, function(){return this.Mi}, function(a){t.l(a, I, W, "spot2"); var b = this.Mi; b.M(a) || (this.Mi = a = a.Z(), this.fa(), this.j("spot2", b, a))}); t.defineProperty(W, {Gc:"parameter1"}, function(){return this.Ir}, function(a){var b = this.Ir; b !== a && (this.Ir = a, this.fa(), this.j("parameter1", b, a))});
        t.defineProperty(W, {Et:"parameter2"}, function(){return this.Jr}, function(a){var b = this.Jr; b !== a && (this.Jr = a, this.fa(), this.j("parameter2", b, a))}); t.A(W, {Qa:"naturalBounds"}, function(){if (null !== this.Oa)return this.gd.assign(this.Oa.Ob), this.gd; var a = this.Ca; return new x(0, 0, a.width, a.height)}); t.g(W, "isRectangular", W.prototype.WI);
        t.defineProperty(W, {WI:"isRectangular"}, function(){return this.$q}, function(a){var b = this.$q; b !== a && (e && t.i(a, "boolean", W, "isRectangular"), this.$q = a, this.fa(), this.j("isRectangular", b, a))}); t.g(W, "pathObject", W.prototype.LA); t.defineProperty(W, {LA:"pathObject"}, function(){return this.Lr}, function(a){var b = this.Lr; b !== a && (e && t.l(a, Q, W, "pathObject"), this.Lr = a, this.ka(), this.j("pathObject", b, a))}); t.g(W, "geometryStretch", W.prototype.Ew);
        t.defineProperty(W, {Ew:"geometryStretch"}, function(){return this.Pq}, function(a){var b = this.Pq; b !== a && (t.Aa(a, Q, W, "geometryStretch"), this.Pq = a, this.j("geometryStretch", b, a))}); t.g(W, "interval", W.prototype.interval); t.defineProperty(W, {interval:"interval"}, function(){return this.Tq}, function(a){var b = this.Tq; e && t.q(a, W, "interval"); a = Math.floor(a); b !== a && 0 <= a && (this.Tq = a, this.h && Ki(this.h), this.fa(), this.j("interval", b, a))});
        W.defineFigureGenerator = function(a, b){t.i(a, "string", W, "defineFigureGenerator:name"); t.i(b, "function", W, "defineFigureGenerator:func"); var c = a.toLowerCase(); "" !== a && "none" !== c && a !== c || t.m("Shape.defineFigureGenerator name must not be empty or None or all-lower-case: " + a); var d = W.FigureGenerators; d[a] = b; d[c] = a};
        W.defineArrowheadGeometry = function(a, b){t.i(a, "string", W, "defineArrowheadGeometry:name"); t.i(b, "string", W, "defineArrowheadGeometry:pathstr"); var c = a.toLowerCase(); "" !== a && "none" !== c && a !== c || t.m("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: " + a); var d = W.ArrowheadGeometries; d[a] = b; d[c] = a};
        function na(){Q.call(this); this.je = ""; this.Gb = "black"; this.Rg = "13px sans-serif"; this.Rd = "start"; this.Xq = !0; this.Vl = this.Wl = !1; this.Pk = fm; this.wm = gm; this.av = this.lf = 0; this.Sn = this.cz = this.dz = null; this.oo = {}; this.Jq = !1; this.jf = this.Sk = this.xs = null; this.Qj = this.Pj = 0; this.Cj = Infinity}t.ga("TextBlock", na); t.Ka(na, Q); na.getEllipsis = function(){return t.Zs}; na.setEllipsis = function(a){t.Zs = a; t.Cw = {}; t.fA = 0};
        na.prototype.cloneProtected = function(a){Q.prototype.cloneProtected.call(this, a); a.je = this.je; a.Gb = this.Gb; a.Rg = this.Rg; a.Rd = this.Rd; a.Xq = this.Xq; a.Wl = this.Wl; a.Vl = this.Vl; a.wm = this.wm; a.Pk = this.Pk; a.lf = this.lf; a.av = this.av; a.dz = this.dz; a.cz = this.cz; a.Sn = this.Sn; a.oo = this.oo; a.Jq = this.Jq; a.xs = this.xs; a.Sk = this.Sk; a.jf = this.jf; a.Pj = this.Pj; a.Qj = this.Qj; a.Cj = this.Cj}; na.prototype.toString = function(){return 22 < this.je.length?'TextBlock("' + this.je.substring(0, 20) + '"...)':'TextBlock("' + this.je + '")'}; var hm;
        na.None = hm = t.w(na, "None", 0); var im; na.WrapFit = im = t.w(na, "WrapFit", 1); var gm; na.WrapDesiredSize = gm = t.w(na, "WrapDesiredSize", 2); var fm; na.OverflowClip = fm = t.w(na, "OverflowClip", 0); var jm; na.OverflowEllipsis = jm = t.w(na, "OverflowEllipsis", 1); na.prototype.fa = function(){Q.prototype.fa.call(this); this.cz = this.dz = null}; t.g(na, "font", na.prototype.font);
        t.defineProperty(na, {font:"font"}, function(){return this.Rg}, function(a){var b = this.Rg; b !== a && (e && t.i(a, "string", na, "font"), this.Rg = a, this.Sn = null, this.fa(), this.j("font", b, a))}); t.g(na, "text", na.prototype.text); t.defineProperty(na, {text:"text"}, function(){return this.je}, function(a){var b = this.je; a = null !== a && void 0 !== a?a.toString():""; b !== a && (this.je = a, this.fa(), this.j("text", b, a))}); t.g(na, "textAlign", na.prototype.textAlign);
        t.defineProperty(na, {textAlign:"textAlign"}, function(){return this.Rd}, function(a){var b = this.Rd; b !== a && (e && t.i(a, "string", na, "textAlign"), "start" === a || "end" === a || "left" === a || "right" === a || "center" === a?(this.Rd = a, this.ka(), this.j("textAlign", b, a)):t.la(a, '"start", "end", "left", "right", or "center"', na, "textAlign"))});
        t.A(na, {Qa:"naturalBounds"}, function(){if (!this.gd.N()){var a = km(this, this.je, {}, 999999).width, b = lm(this, a, {}), c = this.Ca; isNaN(c.width) || (a = c.width); isNaN(c.height) || (b = c.height); Va(this.gd, a, b)}return this.gd}); t.g(na, "isMultiline", na.prototype.Pw); t.defineProperty(na, {Pw:"isMultiline"}, function(){return this.Xq}, function(a){var b = this.Xq; b !== a && (e && t.i(a, "boolean", na, "isMultiline"), this.Xq = a, this.fa(), this.j("isMultiline", b, a))}); t.g(na, "isUnderline", na.prototype.ZI);
        t.defineProperty(na, {ZI:"isUnderline"}, function(){return this.Wl}, function(a){var b = this.Wl; b !== a && (e && t.i(a, "boolean", na, "isUnderline"), this.Wl = a, this.ka(), this.j("isUnderline", b, a))}); t.g(na, "isStrikethrough", na.prototype.XI); t.defineProperty(na, {XI:"isStrikethrough"}, function(){return this.Vl}, function(a){var b = this.Vl; b !== a && (e && t.i(a, "boolean", na, "isStrikethrough"), this.Vl = a, this.ka(), this.j("isStrikethrough", b, a))}); t.g(na, "wrap", na.prototype.qB);
        t.defineProperty(na, {qB:"wrap"}, function(){return this.wm}, function(a){var b = this.wm; b !== a && (e && t.Aa(a, na, na, "wrap"), this.wm = a, this.fa(), this.j("wrap", b, a))}); t.g(na, "overflow", na.prototype.overflow); t.defineProperty(na, {overflow:"overflow"}, function(){return this.Pk}, function(a){var b = this.Pk; b !== a && (e && t.Aa(a, na, na, "overflow"), this.Pk = a, this.fa(), this.j("overflow", b, a))}); t.g(na, "stroke", na.prototype.stroke);
        t.defineProperty(na, {stroke:"stroke"}, function(){return this.Gb}, function(a){var b = this.Gb; b !== a && (e && null !== a && t.To(a, "TextBlock.stroke"), a instanceof fa && a.freeze(), this.Gb = a, this.ka(), this.j("stroke", b, a))}); t.A(na, {mF:"lineCount"}, function(){return this.lf}); t.g(na, "editable", na.prototype.uw); t.defineProperty(na, {uw:"editable"}, function(){return this.Jq}, function(a){var b = this.Jq; b !== a && (e && t.i(a, "boolean", na, "editable"), this.Jq = a, this.j("editable", b, a))}); t.g(na, "textEditor", na.prototype.iB);
        t.defineProperty(na, {iB:"textEditor"}, function(){return this.xs}, function(a){var b = this.xs; b !== a && (a instanceof HTMLElement || t.m("textEditor must be an HTMLElement"), this.xs = a, this.j("textEditor", b, a))}); t.g(na, "errorFunction", na.prototype.$s); t.defineProperty(na, {$s:"errorFunction"}, function(){return this.jf}, function(a){var b = this.jf; b !== a && (null !== a && t.i(a, "function", na, "errorFunction"), this.jf = a, this.j("errorFunction", b, a))}); function wk(a, b){var c = a.Rg; null !== c && b.au !== c && (b.font = c, b.au = c)}
na.prototype.el = function(a, b){if (null !== this.Gb && 0 !== this.je.length && null !== this.Rg){var c = this.Qa.width, d = Ah(this); a.textAlign = this.Rd; xk(this, a, this.Gb, !0); (this.Wl || this.Vl) && xk(this, a, this.Gb, !1); var f = this.oo, g = 0, h = !1, k = t.lc(0, 0); this.ke.Ta(k); var l = t.lc(0, d); this.ke.Ta(l); var m = k.Zj(l); t.B(k); t.B(l); k = b.scale; 8 > m * k * k && (h = !0); b.Qg !== a && (h = !1); for (var m = this.Pj, k = this.Qj, l = f.rg.length, n = 0; n < l; n++){var p = f.rg[n], q = f.Lf[n]; p > c && (p = c); var g = g + m, r = q, q = a, s = g, u = c, v = d, D = 0; h?("start" === this.Rd || "left" ===
        this.Rd?D = 0:"end" === this.Rd || "right" === this.Rd?D = u - p:"center" === this.Rd?D = (u - p) / 2:t.m("textAlign must be start, end, left, right, or center"), q.fillRect(0 + D, s + 0.25 * v, p, 1)):("start" === this.Rd || "left" === this.Rd?D = 0:"end" === this.Rd || "right" === this.Rd?D = u:"center" === this.Rd?D = u / 2:t.m("textAlign must be start, end, left, right, or center"), q.fillText(r, 0 + D, s + v - 0.25 * v), r = v / 20 | 0, this.Wl && ("end" === this.Rd || "right" === this.Rd?D -= p:"center" === this.Rd && (D -= p / 2), q.beginPath(), q.lineWidth = r, q.moveTo(0 + D, s + v - 0.2 *
        v), q.lineTo(0 + D + p, s + v - 0.2 * v), q.stroke()), this.Vl && (q.beginPath(), q.lineWidth = r, s = s + v - v / 2.2 | 0, 0 !== r % 2 && (s += 0.5), q.moveTo(0, s), q.lineTo(0 + p, s), q.stroke())); g += d + k}}};
        na.prototype.tt = function(a, b, c, d){var f = {}, g = 0, h = 0; if (isNaN(this.Ca.width)){g = this.je; if (0 === g.length)g = 0; else if (this.Pw){for (var k = h = 0, l = !1, m = {ph:0}; !l; ){var n = mm(g, k, m); - 1 === n && (n = g.length, l = !0); k = nm(g.substr(k, n - k).replace(/^\s+|\s+$/g, ""), this.Rg); k > h && (h = k); k = m.ph}g = h} else h = mm(g, 0, {}), 0 <= h && (g = g.substr(0, h)), g = k = nm(g, this.Rg); g = Math.min(g, a / this.scale); g = Math.max(8, g)} else g = this.Ca.width; this.ia && (g = Math.min(g, this.ia.He.width), g = Math.max(g, this.ia.Rf.width)); h = lm(this, g, f); m = h = isNaN(this.Ca.height)?
                Math.min(h, b / this.scale):this.Ca.height; if (0 !== f.xg && 1 !== f.Lf.length && this.Pk === jm && (b = this.Rg, l = this.Pk === jm?om(b):0, k = this.Pj + this.Qj, k = Math.max(0, Ah(this) + k), m = Math.max(Math.floor(m / k) - 1, 0), !(m + 1 >= f.Lf.length))){k = f.Lf[m]; for (a = Math.max(1, a - l); nm(k, b) > a && 1 < k.length; )k = k.substr(0, k.length - 1); k += t.Zs; a = nm(k, b); f.Lf[m] = k; f.Lf = f.Lf.slice(0, m + 1); f.rg[m] = a; f.rg = f.rg.slice(0, m + 1); f.ph = f.Lf.length; f.xg = Math.max(f.xg, a)}if (this.qB === im || isNaN(this.Ca.width))g = f.xg, isNaN(this.Ca.width) && (g = Math.max(8, g));
                g = Math.max(c, g); h = Math.max(d, h); Va(this.gd, g, h); hk(this, 0, 0, g, h); this.oo = f}; na.prototype.Uj = function(a, b, c, d){ok(this, a, b, c, d)};
        function km(a, b, c, d){b = b.replace(/^\s+|\s+$/g, ""); void 0 === c.xg && (c.xg = 0); void 0 === c.rg && (c.rg = []); void 0 === c.Lf && (c.Lf = []); var f = 0, g, h, k = a.Rg; g = a.Pj + a.Qj; var l = Math.max(0, Ah(a) + g), m = a.Pk === jm?om(k):0; if (!(a.lf >= a.Cj)){if (a.wm === hm){c.ph = 1; g = nm(b, k); if (0 === m || g <= d)return c.xg = g, c.rg.push(c.xg), c.Lf.push(b), new ga(g, l); var n = pm(b); b = b.substr(n.length); h = pm(b); for (g = nm(n + h, k); 0 < h.length && g <= d; )n += h, b = b.substr(h.length), h = pm(b), g = nm((n + h).replace(/^\s+|\s+$/g, ""), k); n += h.replace(/^\s+|\s+$/g, ""); for (d =
                Math.max(1, d - m); nm(n, k) > d && 1 < n.length; )n = n.substr(0, n.length - 1); n += t.Zs; h = nm(n, k); c.rg.push(h); c.xg = h; c.Lf.push(n); return new ga(h, l)}m = 0; 0 === b.length && (m = 1, c.rg.push(0), c.Lf.push(b)); for (; 0 < b.length; ){n = pm(b); for (b = b.substr(n.length); nm(n, k) > d; ){var p = 1; g = nm(n.substr(0, p), k); for (h = 0; g <= d; )p++, h = g, g = nm(n.substr(0, p), k); 1 === p?(c.rg[a.lf + m] = g, f = Math.max(f, g)):(c.rg[a.lf + m] = h, f = Math.max(f, h)); p--; 1 > p && (p = 1); c.Lf[a.lf + m] = n.substr(0, p); m++; if (a.lf + m === a.Cj)break; n = n.substr(p)}h = pm(b); for (g = nm(n + h, k); 0 <
                h.length && g <= d; )n += h, b = b.substr(h.length), h = pm(b), g = nm((n + h).replace(/^\s+|\s+$/g, ""), k); n = n.replace(/^\s+|\s+$/g, ""); if ("" !== n && (0 === h.length?(c.rg.push(g), f = Math.max(f, g)):(h = nm(n, k), c.rg.push(h), f = Math.max(f, h)), c.Lf.push(n), m++, a.lf + m === a.Cj))break}c.ph = m; c.xg = Math.max(c.xg, f); return new ga(c.xg, l * c.ph)}}function pm(a){for (var b = a.length, c = 0; c < b && " " !== a.charAt(c); )c++; for (; c < b && " " === a.charAt(c); )c++; return c >= b?a:a.substr(0, c)}
function nm(a, b){t.Sp !== b && (t.kn.font = b, t.Sp = b); return t.kn.measureText(a).width}function Ah(a){if (null !== a.Sn)return a.Sn; var b = a.Rg; t.Sp !== b && (t.kn.font = b, t.Sp = b); var c = 0; void 0 !== t.gA[b] && 5E3 > t.CE?c = t.gA[b]:(c = 1.3 * t.kn.measureText("M").width, t.gA[b] = c, t.CE++); return a.Sn = c}function om(a){t.Sp !== a && (t.kn.font = a, t.Sp = a); var b = 0; void 0 !== t.Cw[a] && 5E3 > t.fA?b = t.Cw[a]:(b = t.kn.measureText(t.Zs).width, t.Cw[a] = b, t.fA++); return b}
function mm(a, b, c){void 0 === c.ph && (c.ph = 0); var d = a.indexOf("\r", b); - 1 === d && (d = a.indexOf("\n", b)); 0 <= d && (c.ph = "\r" === a[d] && d + 1 < a.length && "\n" === a[d + 1]?d + 2:d + 1); return d}
function lm(a, b, c){var d = a.je, f = a.Pj + a.Qj, f = Math.max(0, Ah(a) + f); if (0 === d.length)return c.xg = 0, a.lf = 1, f; if (!a.Pw){var g = mm(d, 0, {}); 0 <= g && (d = d.substr(0, g))}for (var g = 0, h = a.lf = 0, k = - 1, l = {ph:0}, m = !1; !m; )k = mm(d, h, l), - 1 === k && (k = d.length, m = !0), h <= k && (h = d.substr(h, k - h), a.wm !== hm?(c.ph = 0, h = km(a, h, c, b), g += h.height, a.lf += c.ph):(km(a, h, c, b), g += f, a.lf++), a.lf === a.Cj && (m = !0)), h = l.ph; return a.av = g}t.g(na, "textValidation", na.prototype.Ut);
        t.defineProperty(na, {Ut:"textValidation"}, function(){return this.Sk}, function(a){var b = this.Sk; b !== a && (null !== a && t.i(a, "function", na, "textValidation"), this.Sk = a, this.j("textValidation", b, a))}); t.g(na, "spacingAbove", na.prototype.QJ); t.defineProperty(na, {QJ:"spacingAbove"}, function(){return this.Pj}, function(a){var b = this.Pj; b !== a && (this.Pj = a, this.j("spacingAbove", b, a))}); t.g(na, "spacingBelow", na.prototype.RJ);
        t.defineProperty(na, {RJ:"spacingBelow"}, function(){return this.Qj}, function(a){var b = this.Qj; b !== a && (this.Qj = a, this.j("spacingBelow", b, a))}); t.g(na, "maxLines", na.prototype.kJ); t.defineProperty(na, {kJ:"maxLines"}, function(){return this.Cj}, function(a){var b = this.Cj; b !== a && (this.Cj = a, this.j("maxLines", b, a))}); function Vk(){Q.call(this); this.ag = null; this.ps = ""; this.Oj = (new x(NaN, NaN, NaN, NaN)).freeze(); this.Xn = Cc; this.vs = this.jf = null; this.Su = this.Ju = this.cm = !1; this.sz = "anonymous"}t.ga("Picture", Vk);
        t.Ka(Vk, Q); var qm; Vk.clearCache = qm = function(a){void 0 === a && (a = ""); t.i(a, "string", Vk, "clearCache:url"); "" !== a?t.jt[a] && (delete t.jt[a], t.Iw--):(t.jt = {}, t.Iw = 0)}; Vk.prototype.cloneProtected = function(a){Q.prototype.cloneProtected.call(this, a); a.element = this.ag; a.ps = this.ps; a.Oj.assign(this.Oj); a.Xn = this.Xn; a.jf = this.jf}; Vk.prototype.toString = function(){return"Picture(" + this.source + ")#" + t.od(this)}; t.g(Vk, "element", Vk.prototype.element);
        t.defineProperty(Vk, {element:"element"}, function(){return this.ag}, function(a){var b = this.ag; if (b !== a){a instanceof HTMLImageElement || a instanceof HTMLVideoElement || a instanceof HTMLCanvasElement || t.m("Picture.element must be an instance of Image, Canvas, or Video."); this.Ju = !1; var c = this; a instanceof HTMLCanvasElement?this.Su = !0:(this.Su = !1, a.onerror = function(a){c.Ju = !0; null !== c.jf && c.jf(c, a)}); this.ag = a; !0 === a.complete || void 0 === a.complete?(this.cm = !0, this.Ca.N() || (lk(this, !1), this.fa())):(t.mB.push(this),
                null === t.hx && (t.hx = setInterval(function(){for (var a = [], b = t.mB, c = b.length, h = 0; h < c; h++){var k = b[h], l; l = k; var m = l.ag; if (m)if (m.complete){l.cm = !0; l.Ca.N() || (lk(l, !1), l.fa()); if (l.h)l.Ca.N() || l.h.Mc(), l.h.ka(); else{l = t.$z; var n = l.length; if (0 === n)for (var n = document.getElementsByTagName("canvas"), p = n.length, m = 0; m < p; m++){var q = n[m]; q.parentElement && q.parentElement.U && l.push(q.parentElement.U)}n = l.length; for (m = 0; m < n; m++)l[m].ka()}l = !0} else l = !1; else l = !0; l || a.push(k)}0 === a.length && (clearInterval(t.hx), t.hx =
                        null); t.mB = a}, 200))); this.j("element", b, a); this.ka()}}); t.g(Vk, "source", Vk.prototype.source); t.defineProperty(Vk, {source:"source"}, function(){return this.ps}, function(a){var b = this.ps; if (b !== a){t.i(a, "string", Vk, "source"); this.ps = a; this.Ju = !1; var c = t.jt; if (void 0 !== c[a])this.element = c[a]; else{10 < t.Iw && (qm(), c = t.jt); var d = document.createElement("img"); d.crossOrigin = this.sz; d.src = a; c[a] = d; t.Iw++; d instanceof HTMLImageElement && (this.element = d)}this.ka(); this.j("source", b, a)}});
        t.g(Vk, "sourceCrossOrigin", Vk.prototype.OJ); t.defineProperty(Vk, {OJ:"sourceCrossOrigin"}, function(){return this.sz}, function(a){this.sz = a; this.element && (this.element.crossOrigin = a)}); t.g(Vk, "sourceRect", Vk.prototype.fi); t.defineProperty(Vk, {fi:"sourceRect"}, function(){return this.Oj}, function(a){var b = this.Oj; b.M(a) || (t.l(a, x, Vk, "sourceRect"), this.Oj = a = a.Z(), this.ka(), this.j("sourceRect", b, a))}); t.g(Vk, "imageStretch", Vk.prototype.NI);
        t.defineProperty(Vk, {NI:"imageStretch"}, function(){return this.Xn}, function(a){var b = this.Xn; b !== a && (t.Aa(a, Q, Vk, "imageStretch"), this.Xn = a, this.ka(), this.j("imageStretch", b, a))}); t.g(Vk, "errorFunction", Vk.prototype.$s); t.defineProperty(Vk, {$s:"errorFunction"}, function(){return this.jf}, function(a){var b = this.jf; if (b !== a){null !== a && t.i(a, "function", Vk, "errorFunction"); this.jf = a; if (this.ag){var c = this; this.ag.onerror = function(a){null !== c.jf && c.jf(c, a)}}this.j("errorFunction", b, a)}});
        Vk.prototype.el = function(a, b){if (!b.Nn){if (null === this.vs)if (null === this.ag)this.vs = !1; else{var c = document.createElement("canvas").getContext("2d"); 0 !== this.ag.width && 0 !== this.ag.height && c.drawImage(this.ag, 0, 0); try{c.getImageData(0, 0, 1, 1), this.vs = !1} catch (d){this.vs = !0}}if (this.vs)return}if (this.cm && !this.Ju && (c = this.ag, null !== c)){var f = c.src; null !== f && "" !== f || t.m("Element has no source attribute: " + c); var f = this.Qa, g = 0, h = 0, k = this.Su, l = k? + c.width:c.naturalWidth, k = k? + c.height:c.naturalHeight; void 0 ===
                l && c.videoWidth && (l = c.videoWidth); void 0 === k && c.videoHeight && (k = c.videoHeight); l = l || f.width; k = k || f.height; if (0 !== l && 0 !== k){this.fi.N() && (g = this.Oj.x, h = this.Oj.y, l = this.Oj.width, k = this.Oj.height); var m = l, n = k, p = this.Xn; switch (p){case Vg:if (this.fi.N())break; g += Math.max((m - f.width) / 2, 0); h += Math.max((n - f.height) / 2, 0); l = Math.min(f.width, m); k = Math.min(f.height, n); break; case Cc:m = f.width; n = f.height; break; case Xg:case Yg:p === Xg?(p = Math.min(f.height / n, f.width / m), m *= p, n *= p):p === Yg && (p = Math.max(f.height / n, f.width /
                m), m *= p, n *= p, g += (m - f.width) / 2, h += (n - f.height) / 2, l *= 1 / (m / f.width), k *= 1 / (n / f.height), m = f.width, n = f.height)}try{a.drawImage(c, g, h, l, k, Math.max((f.width - m) / 2, 0), Math.max((f.height - n) / 2, 0), Math.min(f.width, m), Math.min(f.height, n))} catch (q){}}}}; t.A(Vk, {Qa:"naturalBounds"}, function(){return this.gd});
        Vk.prototype.tt = function(a, b, c, d){var f = this.Ca, g = kk(this), h = this.ag, k = this.Su; if (k || !this.cm && h && h.complete)this.cm = !0; null === h && (isFinite(a) || (a = 0), isFinite(b) || (b = 0)); isFinite(f.width) || g === Cc || g === ck?(isFinite(a) || (a = this.fi.N()?this.fi.width:k? + h.width:h.naturalWidth), c = 0):null !== h && !1 !== this.cm && (a = this.fi.N()?this.fi.width:k? + h.width:h.naturalWidth); isFinite(f.height) || g === Cc || g === bk?(isFinite(b) || (b = this.fi.N()?this.fi.height:k? + h.height:h.naturalHeight), d = 0):null !== h && !1 !== this.cm && (b = this.fi.N()?
                this.fi.height:k? + h.height:h.naturalHeight); isFinite(f.width) && (a = f.width); isFinite(f.height) && (b = f.height); f = this.He; g = this.Rf; c = Math.max(c, g.width); d = Math.max(d, g.height); a = Math.min(f.width, a); b = Math.min(f.height, b); a = Math.max(c, a); b = Math.max(d, b); null === h || h.complete || (isFinite(a) || (a = 0), isFinite(b) || (b = 0)); Va(this.gd, a, b); hk(this, 0, 0, a, b)}; Vk.prototype.Uj = function(a, b, c, d){ok(this, a, b, c, d)}; function ia(){this.s = new zc; this.Vb = null}aa = ia.prototype; aa.reset = function(){this.s = new zc; this.Vb = null};
        function J(a, b, c, d, f, g){null === a.s && t.m("StreamGeometryContext has been closed"); void 0 !== f && !0 === f?(null === a.Vb && t.m("Need to call beginFigure first"), d = new id(bd), d.D = b, d.F = c, a.Vb.Fa.add(d)):(a.Vb = new Bc, a.Vb.qa = b, a.Vb.ra = c, a.Vb.op = d, a.s.Ab.add(a.Vb)); void 0 !== g && (a.Vb.co = g)}function M(a){null === a.s && t.m("StreamGeometryContext has been closed"); null === a.Vb && t.m("Need to call beginFigure first"); var b = a.Vb.Fa.length; 0 < b && a.Vb.Fa.n[b - 1].close()}
function Zc(a){null === a.s && t.m("StreamGeometryContext has been closed"); null === a.Vb && t.m("Need to call beginFigure first"); 0 < a.Vb.Fa.length && (a.Vb.op = !0)}aa.bb = function(a){null === this.s && t.m("StreamGeometryContext has been closed"); null === this.Vb && t.m("Need to call beginFigure first"); this.Vb.fj = a}; aa.moveTo = function(a, b, c){null === this.s && t.m("StreamGeometryContext has been closed"); null === this.Vb && t.m("Need to call beginFigure first"); var d = new id(bd); d.D = a; d.F = b; c && d.close(); this.Vb.Fa.add(d)};
        aa.lineTo = function(a, b, c){null === this.s && t.m("StreamGeometryContext has been closed"); null === this.Vb && t.m("Need to call beginFigure first"); var d = new id(Oc); d.D = a; d.F = b; c && d.close(); this.Vb.Fa.add(d)}; function K(a, b, c, d, f, g, h, k){null === a.s && t.m("StreamGeometryContext has been closed"); null === a.Vb && t.m("Need to call beginFigure first"); var l = new id(cd); l.Bb = b; l.Rb = c; l.se = d; l.te = f; l.D = g; l.F = h; k && l.close(); a.Vb.Fa.add(l)}
function Sc(a, b, c, d, f){null === a.s && t.m("StreamGeometryContext has been closed"); null === a.Vb && t.m("Need to call beginFigure first"); var g = new id(dd); g.Bb = b; g.Rb = c; g.D = d; g.F = f; a.Vb.Fa.add(g)}aa.arcTo = function(a, b, c, d, f, g, h){null === this.s && t.m("StreamGeometryContext has been closed"); null === this.Vb && t.m("Need to call beginFigure first"); var k = new id(ed); k.mh = a; k.hi = b; k.Da = c; k.Pa = d; k.radiusX = f; k.radiusY = g?g:f; h && k.close(); this.Vb.Fa.add(k)};
        function Tc(a, b, c, d, f, g, h, k){null === a.s && t.m("StreamGeometryContext has been closed"); null === a.Vb && t.m("Need to call beginFigure first"); b = new id(fd, h, k, b, c, d, f, g); a.Vb.Fa.add(b)}
H.makeGeometry = function(a, b, c){var d = a.Ca, f = d.width, d = d.height; void 0 !== b && !isNaN(b) && isFinite(b) && (f = b); void 0 !== c && !isNaN(c) && isFinite(c) && (d = c); isFinite(f) || (f = 100); isFinite(d) || (d = 100); b = void 0; "None" !== a.on?b = H.Am[a.on]:"None" !== a.Dw?b = H.Am[a.Dw]:(c = H.aj[a.zb], "string" === typeof c && (c = H.aj[c]), void 0 === c && t.m("Unknown Shape.figure: " + a.zb), b = c(a, f, d), b.ao = f, b.$n = d); void 0 === b && (c = H.aj.Rectangle) && (b = c(a, f, d)); return b};
        H.Ui = function(a, b, c, d, f, g, h, k, l, m, n, p, q, r){var s = 1 - l; a = a * s + c * l; b = b * s + d * l; c = c * s + f * l; d = d * s + g * l; f = f * s + h * l; g = g * s + k * l; k = a * s + c * l; h = b * s + d * l; c = c * s + f * l; d = d * s + g * l; m.x = a; m.y = b; n.x = k; n.y = h; p.x = k * s + c * l; p.y = h * s + d * l; q.x = c; q.y = d; r.x = f; r.y = g}; H.Wo = function(a){a = H.Km(a); var b = t.Cb(); b[0] = a[0]; for (var c = 1, d = 1; c < a.length; c += 2, d += 3)b[d] = a[c], b[d + 1] = a[c], b[d + 2] = a[c + 1]; t.ya(a); return b};
        H.Km = function(a){var b = H.cl(a), c = t.Cb(), d = Math.floor(b.length / 2), f = b.length - 1; a = 0 === a % 2?2:1; for (var g = 0; g < f; g++){var h = b[g], k = b[g + 1], l = b[(d + g - 1) % f], m = b[(d + g + a) % f]; c[2 * g] = h; c[2 * g + 1] = H.il(h.x, h.y, l.x, l.y, k.x, k.y, m.x, m.y, new w)}c[c.length] = c[0]; t.ya(b); return c}; H.il = function(a, b, c, d, f, g, h, k, l){c = a - c; h = f - h; 0 === c || 0 === h?0 === c?(h = (g - k) / h, k = a, f = h * k + (g - h * f)):(d = (b - d) / c, k = f, f = d * k + (b - d * a)):(d = (b - d) / c, h = (g - k) / h, a = b - d * a, k = (g - h * f - a) / (d - h), f = d * k + a); l.p(k, f); return l};
        H.cl = function(a){for (var b = t.Cb(), c = 1.5 * Math.PI, d = 0, f = 0; f < a; f++)d = 2 * Math.PI / a * f + c, b[f] = new w(0.5 + 0.5 * Math.cos(d), 0.5 + 0.5 * Math.sin(d)); b.push(b[0]); return b}; H.tB = (new I(0.156, 0.156)).Ja(); H.uB = (new I(0.844, 0.844)).Ja();
        H.aj = {None:"Rectangle", Rectangle:function(a, b, c){a = new zc; a.type = Ec; a.qa = 0; a.ra = 0; a.D = b; a.F = c; return a}, Square:function(a, b, c){a = new zc; a.wc = Xg; a.type = Ec; a.qa = 0; a.ra = 0; a.D = b; a.F = c; return a}, Ellipse:function(a, b, c){a = new zc; a.type = Mc; a.qa = 0; a.ra = 0; a.D = b; a.F = c; a.G = H.tB; a.H = H.uB; return a}, Circle:function(a, b, c){a = new zc; a.wc = Xg; a.type = Mc; a.qa = 0; a.ra = 0; a.D = b; a.F = c; a.G = H.tB; a.H = H.uB; return a}, Connector:"Ellipse", TriangleRight:function(a, b, c){a = new zc; var d = new Bc, f = new id; f.D = b; f.F = 0.5 * c; d.Fa.add(f); b =
                new id; b.D = 0; b.F = c; d.Fa.add(b.close()); a.Ab.add(d); a.G = new I(0, 0.25); a.H = new I(0.5, 0.75); return a}, TriangleDown:function(a, b, c){a = new zc; var d = new Bc, f = new id; f.D = b; f.F = 0; d.Fa.add(f); f = new id; f.D = 0.5 * b; f.F = c; d.Fa.add(f.close()); a.Ab.add(d); a.G = new I(0.25, 0); a.H = new I(0.75, 0.5); return a}, TriangleLeft:function(a, b, c){a = new zc; var d = new Bc; d.qa = b; d.ra = c; var f = new id; f.D = 0; f.F = 0.5 * c; d.Fa.add(f); c = new id; c.D = b; c.F = 0; d.Fa.add(c.close()); a.Ab.add(d); a.G = new I(0.5, 0.25); a.H = new I(1, 0.75); return a}, TriangleUp:function(a,
                b, c){a = new zc; var d = new Bc; d.qa = b; d.ra = c; var f = new id; f.D = 0; f.F = c; d.Fa.add(f); c = new id; c.D = 0.5 * b; c.F = 0; d.Fa.add(c.close()); a.Ab.add(d); a.G = new I(0.25, 0.5); a.H = new I(0.75, 1); return a}, Line1:function(a, b, c){a = new zc; a.type = Dc; a.qa = 0; a.ra = 0; a.D = b; a.F = c; return a}, Line2:function(a, b, c){a = new zc; a.type = Dc; a.qa = b; a.ra = 0; a.D = 0; a.F = c; return a}, MinusLine:"LineH", LineH:function(a, b, c){a = new zc; a.type = Dc; a.qa = 0; a.ra = c / 2; a.D = b; a.F = c / 2; return a}, LineV:function(a, b, c){a = new zc; a.type = Dc; a.qa = b / 2; a.ra = 0; a.D = b / 2;
                a.F = c; return a}, Curve1:function(a, b, c){var d = H.va; a = t.u(); J(a, 0, 0, !1); K(a, d * b, 0, 1 * b, (1 - d) * c, b, c); b = a.s; t.v(a); return b}, Curve2:function(a, b, c){var d = H.va; a = t.u(); J(a, 0, 0, !1); K(a, 0, d * c, (1 - d) * b, c, b, c); b = a.s; t.v(a); return b}, Curve3:function(a, b, c){var d = H.va; a = t.u(); J(a, 1 * b, 0, !1); K(a, 1 * b, d * c, d * b, 1 * c, 0, 1 * c); b = a.s; t.v(a); return b}, Curve4:function(a, b, c){var d = H.va; a = t.u(); J(a, 1 * b, 0, !1); K(a, (1 - d) * b, 0, 0, (1 - d) * c, 0, 1 * c); b = a.s; t.v(a); return b}, Alternative:"Triangle", Merge:"Triangle", Triangle:function(a, b, c){a =
                t.u(); J(a, 0.5 * b, 0 * c, !0); a.lineTo(0 * b, 1 * c); a.lineTo(1 * b, 1 * c, !0); b = a.s; b.G = new I(0.25, 0.5); b.H = new I(0.75, 1); t.v(a); return b}, Decision:"Diamond", Diamond:function(a, b, c){a = t.u(); J(a, 0.5 * b, 0, !0); a.lineTo(0, 0.5 * c); a.lineTo(0.5 * b, 1 * c); a.lineTo(1 * b, 0.5 * c, !0); b = a.s; b.G = new I(0.25, 0.25); b.H = new I(0.75, 0.75); t.v(a); return b}, Pentagon:function(a, b, c){var d = H.cl(5); a = t.u(); J(a, d[0].x * b, d[0].y * c, !0); for (var f = 1; 5 > f; f++)a.lineTo(d[f].x * b, d[f].y * c); t.ya(d); M(a); b = a.s; b.G = new I(0.2, 0.22); b.H = new I(0.8, 0.9); t.v(a);
                return b}, DataTransmission:"Hexagon", Hexagon:function(a, b, c){var d = H.cl(6); a = t.u(); J(a, d[0].x * b, d[0].y * c, !0); for (var f = 1; 6 > f; f++)a.lineTo(d[f].x * b, d[f].y * c); t.ya(d); M(a); b = a.s; b.G = new I(0.07, 0.25); b.H = new I(0.93, 0.75); t.v(a); return b}, Heptagon:function(a, b, c){var d = H.cl(7); a = t.u(); J(a, d[0].x * b, d[0].y * c, !0); for (var f = 1; 7 > f; f++)a.lineTo(d[f].x * b, d[f].y * c); t.ya(d); M(a); b = a.s; b.G = new I(0.2, 0.15); b.H = new I(0.8, 0.85); t.v(a); return b}, Octagon:function(a, b, c){var d = H.cl(8); a = t.u(); J(a, d[0].x * b, d[0].y * c, !0);
                for (var f = 1; 8 > f; f++)a.lineTo(d[f].x * b, d[f].y * c); t.ya(d); M(a); b = a.s; b.G = new I(0.15, 0.15); b.H = new I(0.85, 0.85); t.v(a); return b}, Nonagon:function(a, b, c){var d = H.cl(9); a = t.u(); J(a, d[0].x * b, d[0].y * c, !0); for (var f = 1; 9 > f; f++)a.lineTo(d[f].x * b, d[f].y * c); t.ya(d); M(a); b = a.s; b.G = new I(0.17, 0.13); b.H = new I(0.82, 0.82); t.v(a); return b}, Decagon:function(a, b, c){var d = H.cl(10); a = t.u(); J(a, d[0].x * b, d[0].y * c, !0); for (var f = 1; 10 > f; f++)a.lineTo(d[f].x * b, d[f].y * c); t.ya(d); M(a); b = a.s; b.G = new I(0.16, 0.16); b.H = new I(0.84,
                0.84); t.v(a); return b}, Dodecagon:function(a, b, c){var d = H.cl(12); a = t.u(); J(a, d[0].x * b, d[0].y * c, !0); for (var f = 1; 12 > f; f++)a.lineTo(d[f].x * b, d[f].y * c); t.ya(d); M(a); b = a.s; b.G = new I(0.16, 0.16); b.H = new I(0.84, 0.84); t.v(a); return b}, FivePointedStar:function(a, b, c){var d = H.Km(5); a = t.u(); J(a, d[0].x * b, d[0].y * c, !0); for (var f = 1; 10 > f; f++)a.lineTo(d[f].x * b, d[f].y * c); t.ya(d); M(a); b = a.s; b.G = new I(0.312, 0.383); b.H = new I(0.693, 0.765); t.v(a); return b}, SixPointedStar:function(a, b, c){var d = H.Km(6); a = t.u(); J(a, d[0].x * b,
                d[0].y * c, !0); for (var f = 1; 12 > f; f++)a.lineTo(d[f].x * b, d[f].y * c); t.ya(d); M(a); b = a.s; b.G = new I(0.17, 0.251); b.H = new I(0.833, 0.755); t.v(a); return b}, SevenPointedStar:function(a, b, c){var d = H.Km(7); a = t.u(); J(a, d[0].x * b, d[0].y * c, !0); for (var f = 1; 14 > f; f++)a.lineTo(d[f].x * b, d[f].y * c); t.ya(d); M(a); b = a.s; b.G = new I(0.363, 0.361); b.H = new I(0.641, 0.709); t.v(a); return b}, EightPointedStar:function(a, b, c){var d = H.Km(8); a = t.u(); J(a, d[0].x * b, d[0].y * c, !0); for (var f = 1; 16 > f; f++)a.lineTo(d[f].x * b, d[f].y * c); t.ya(d); M(a); b = a.s;
                b.G = new I(0.252, 0.255); b.H = new I(0.75, 0.75); t.v(a); return b}, NinePointedStar:function(a, b, c){var d = H.Km(9); a = t.u(); J(a, d[0].x * b, d[0].y * c, !0); for (var f = 1; 18 > f; f++)a.lineTo(d[f].x * b, d[f].y * c); t.ya(d); M(a); b = a.s; b.G = new I(0.355, 0.361); b.H = new I(0.645, 0.651); t.v(a); return b}, TenPointedStar:function(a, b, c){var d = H.Km(10); a = t.u(); J(a, d[0].x * b, d[0].y * c, !0); for (var f = 1; 20 > f; f++)a.lineTo(d[f].x * b, d[f].y * c); t.ya(d); M(a); b = a.s; b.G = new I(0.281, 0.261); b.H = new I(0.723, 0.748); t.v(a); return b}, FivePointedBurst:function(a,
                b, c){var d = H.Wo(5); a = t.u(); J(a, d[0].x * b, d[0].y * c, !0); for (var f = 1; f < d.length; f += 3)K(a, d[f].x * b, d[f].y * c, d[f + 1].x * b, d[f + 1].y * c, d[f + 2].x * b, d[f + 2].y * c); t.ya(d); M(a); b = a.s; b.G = new I(0.312, 0.383); b.H = new I(0.693, 0.765); t.v(a); return b}, SixPointedBurst:function(a, b, c){var d = H.Wo(6); a = t.u(); J(a, d[0].x * b, d[0].y * c, !0); for (var f = 1; f < d.length; f += 3)K(a, d[f].x * b, d[f].y * c, d[f + 1].x * b, d[f + 1].y * c, d[f + 2].x * b, d[f + 2].y * c); t.ya(d); M(a); b = a.s; b.G = new I(0.17, 0.251); b.H = new I(0.833, 0.755); t.v(a); return b}, SevenPointedBurst:function(a,
                b, c){var d = H.Wo(7); a = t.u(); J(a, d[0].x * b, d[0].y * c, !0); for (var f = 1; f < d.length; f += 3)K(a, d[f].x * b, d[f].y * c, d[f + 1].x * b, d[f + 1].y * c, d[f + 2].x * b, d[f + 2].y * c); t.ya(d); M(a); b = a.s; b.G = new I(0.363, 0.361); b.H = new I(0.641, 0.709); t.v(a); return b}, EightPointedBurst:function(a, b, c){var d = H.Wo(8); a = t.u(); J(a, d[0].x * b, d[0].y * c, !0); for (var f = 1; f < d.length; f += 3)K(a, d[f].x * b, d[f].y * c, d[f + 1].x * b, d[f + 1].y * c, d[f + 2].x * b, d[f + 2].y * c); t.ya(d); M(a); b = a.s; b.G = new I(0.252, 0.255); b.H = new I(0.75, 0.75); t.v(a); return b}, NinePointedBurst:function(a,
                b, c){var d = H.Wo(9); a = t.u(); J(a, d[0].x * b, d[0].y * c, !0); for (var f = 1; f < d.length; f += 3)K(a, d[f].x * b, d[f].y * c, d[f + 1].x * b, d[f + 1].y * c, d[f + 2].x * b, d[f + 2].y * c); t.ya(d); M(a); b = a.s; b.G = new I(0.355, 0.361); b.H = new I(0.645, 0.651); t.v(a); return b}, TenPointedBurst:function(a, b, c){var d = H.Wo(10); a = t.u(); J(a, d[0].x * b, d[0].y * c, !0); for (var f = 1; f < d.length; f += 3)K(a, d[f].x * b, d[f].y * c, d[f + 1].x * b, d[f + 1].y * c, d[f + 2].x * b, d[f + 2].y * c); t.ya(d); M(a); b = a.s; b.G = new I(0.281, 0.261); b.H = new I(0.723, 0.748); t.v(a); return b}, Cloud:function(a,
                b, c){a = t.u(); J(a, 0.08034461 * b, 0.1944299 * c, !0); K(a, - 0.09239631 * b, 0.07836421 * c, 0.1406031 * b, - 0.0542823 * c, 0.2008615 * b, 0.05349299 * c); K(a, 0.2450511 * b, - 0.00697547 * c, 0.3776197 * b, - 0.01112067 * c, 0.4338609 * b, 0.074219 * c); K(a, 0.4539471 * b, 0, 0.6066018 * b, - 0.02526587 * c, 0.6558228 * b, 0.07004196 * c); K(a, 0.6914277 * b, - 0.01904177 * c, 0.8921095 * b, - 0.01220843 * c, 0.8921095 * b, 0.08370865 * c); K(a, 1.036446 * b, 0.04105738 * c, 1.020377 * b, 0.3022052 * c, 0.9147671 * b, 0.3194596 * c); K(a, 1.04448 * b, 0.360238 * c, 0.992256 * b, 0.5219009 * c, 0.9082935 * b, 0.562044 *
                c); K(a, 1.032337 * b, 0.5771781 * c, 1.018411 * b, 0.8120651 * c, 0.9212406 * b, 0.8217117 * c); K(a, 1.028411 * b, 0.9571472 * c, 0.8556702 * b, 1.052487 * c, 0.7592566 * b, 0.9156953 * c); K(a, 0.7431877 * b, 1.009325 * c, 0.5624123 * b, 1.021761 * c, 0.5101666 * b, 0.9310455 * c); K(a, 0.4820677 * b, 1.031761 * c, 0.3030112 * b, 1.002796 * c, 0.2609328 * b, 0.9344623 * c); K(a, 0.2329994 * b, 1.01518 * c, 0.03213784 * b, 1.01518 * c, 0.08034461 * b, 0.870098 * c); K(a, - 0.02812061 * b, 0.9032597 * c, - 0.01205169 * b, 0.6835638 * c, 0.06829292 * b, 0.6545475 * c); K(a, - 0.01812061 * b, 0.6089503 * c, - 0.00606892 *
                b, 0.4555777 * c, 0.06427569 * b, 0.4265613 * c); K(a, - 0.01606892 * b, 0.3892545 * c, - 0.01205169 * b, 0.1944299 * c, 0.08034461 * b, 0.1944299 * c); M(a); b = a.s; b.G = new I(0.1, 0.1); b.H = new I(0.9, 0.9); t.v(a); return b}, Gate:"Crescent", Crescent:function(a, b, c){a = t.u(); J(a, 0, 0, !0); K(a, 1 * b, 0, 1 * b, 1 * c, 0, 1 * c); K(a, 0.5 * b, 0.75 * c, 0.5 * b, 0.25 * c, 0, 0); M(a); b = a.s; b.G = new I(0.511, 0.19); b.H = new I(0.776, 0.76); t.v(a); return b}, FramedRectangle:function(a, b, c){var d = t.u(), f = a?a.Gc:0; a = a?a.Et:0; 0 === f && (f = 0.1); 0 === a && (a = 0.1); J(d, 0, 0, !0); d.lineTo(1 * b,
                0); d.lineTo(1 * b, 1 * c); d.lineTo(0, 1 * c, !0); J(d, f * b, a * c, !1, !0); d.lineTo(f * b, (1 - a) * c); d.lineTo((1 - f) * b, (1 - a) * c); d.lineTo((1 - f) * b, a * c, !0); b = d.s; b.G = new I(f, a); b.H = new I(1 - f, 1 - a); t.v(d); return b}, Delay:"HalfEllipse", HalfEllipse:function(a, b, c){var d = H.va; a = t.u(); J(a, 0, 0, !0); K(a, d * b, 0, 1 * b, (0.5 - d / 2) * c, 1 * b, 0.5 * c); K(a, 1 * b, (0.5 + d / 2) * c, d * b, 1 * c, 0, 1 * c); M(a); b = a.s; b.G = new I(0, 0.2); b.H = new I(0.75, 0.8); t.v(a); return b}, Heart:function(a, b, c){a = t.u(); J(a, 0.5 * b, 1 * c, !0); K(a, 0.1 * b, 0.8 * c, 0, 0.5 * c, 0 * b, 0.3 * c); K(a, 0 * b, 0, 0.45 *
                b, 0, 0.5 * b, 0.3 * c); K(a, 0.55 * b, 0, 1 * b, 0, 1 * b, 0.3 * c); K(a, b, 0.5 * c, 0.9 * b, 0.8 * c, 0.5 * b, 1 * c); M(a); b = a.s; b.G = new I(0.15, 0.29); b.H = new I(0.86, 0.68); t.v(a); return b}, Spade:function(a, b, c){a = t.u(); J(a, 0.5 * b, 0, !0); a.lineTo(0.51 * b, 0.01 * c); K(a, 0.6 * b, 0.2 * c, b, 0.25 * c, b, 0.5 * c); K(a, b, 0.8 * c, 0.6 * b, 0.8 * c, 0.55 * b, 0.7 * c); K(a, 0.5 * b, 0.75 * c, 0.55 * b, 0.95 * c, 0.75 * b, c); a.lineTo(0.25 * b, c); K(a, 0.45 * b, 0.95 * c, 0.5 * b, 0.75 * c, 0.45 * b, 0.7 * c); K(a, 0.4 * b, 0.8 * c, 0, 0.8 * c, 0, 0.5 * c); K(a, 0, 0.25 * c, 0.4 * b, 0.2 * c, 0.49 * b, 0.01 * c); M(a); b = a.s; b.G = new I(0.19, 0.26);
                b.H = new I(0.8, 0.68); t.v(a); return b}, Club:function(a, b, c){a = t.u(); J(a, 0.4 * b, 0.6 * c, !0); K(a, 0.5 * b, 0.75 * c, 0.45 * b, 0.95 * c, 0.15 * b, 1 * c); a.lineTo(0.85 * b, c); K(a, 0.55 * b, 0.95 * c, 0.5 * b, 0.75 * c, 0.6 * b, 0.6 * c); var d = 0.2, f = 0.3, g = 0, h = 4 * (Math.SQRT2 - 1) / 3 * d; K(a, (0.5 - d + f) * b, (0.5 + h + g) * c, (0.5 - h + f) * b, (0.5 + d + g) * c, (0.5 + f) * b, (0.5 + d + g) * c); K(a, (0.5 + h + f) * b, (0.5 + d + g) * c, (0.5 + d + f) * b, (0.5 + h + g) * c, (0.5 + d + f) * b, (0.5 + g) * c); K(a, (0.5 + d + f) * b, (0.5 - h + g) * c, (0.5 + h + f) * b, (0.5 - d + g) * c, (0.5 + f) * b, (0.5 - d + g) * c); K(a, (0.5 - h + f) * b, (0.5 - d + g) * c, (0.5 - d + f + 0.05) *
                b, (0.5 - h + g - 0.02) * c, 0.65 * b, 0.36771243 * c); d = 0.2; f = 0; g = - 0.3; h = 4 * (Math.SQRT2 - 1) / 3 * d; K(a, (0.5 + h + f) * b, (0.5 + d + g) * c, (0.5 + d + f) * b, (0.5 + h + g) * c, (0.5 + d + f) * b, (0.5 + g) * c); K(a, (0.5 + d + f) * b, (0.5 - h + g) * c, (0.5 + h + f) * b, (0.5 - d + g) * c, (0.5 + f) * b, (0.5 - d + g) * c); K(a, (0.5 - h + f) * b, (0.5 - d + g) * c, (0.5 - d + f) * b, (0.5 - h + g) * c, (0.5 - d + f) * b, (0.5 + g) * c); K(a, (0.5 - d + f) * b, (0.5 + h + g) * c, (0.5 - h + f) * b, (0.5 + d + g) * c, 0.35 * b, 0.36771243 * c); d = 0.2; f = - 0.3; g = 0; h = 4 * (Math.SQRT2 - 1) / 3 * d; K(a, (0.5 + d + f - 0.05) * b, (0.5 - h + g - 0.02) * c, (0.5 + h + f) * b, (0.5 - d + g) * c, (0.5 + f) * b, (0.5 - d + g) * c);
                K(a, (0.5 - h + f) * b, (0.5 - d + g) * c, (0.5 - d + f) * b, (0.5 - h + g) * c, (0.5 - d + f) * b, (0.5 + g) * c); K(a, (0.5 - d + f) * b, (0.5 + h + g) * c, (0.5 - h + f) * b, (0.5 + d + g) * c, (0.5 + f) * b, (0.5 + d + g) * c); K(a, (0.5 + h + f) * b, (0.5 + d + g) * c, (0.5 + d + f) * b, (0.5 + h + g) * c, 0.4 * b, 0.6 * c); M(a); b = a.s; b.G = new I(0.06, 0.39); b.H = new I(0.93, 0.58); t.v(a); return b}, Ring:function(a, b, c){a = t.u(); var d = 4 * (Math.SQRT2 - 1) / 3 * 0.5; J(a, b, 0.5 * c, !0); K(a, b, (0.5 - d) * c, (0.5 + d) * b, 0, 0.5 * b, 0); K(a, (0.5 - d) * b, 0, 0, (0.5 - d) * c, 0, 0.5 * c); K(a, 0, (0.5 + d) * c, (0.5 - d) * b, c, 0.5 * b, c); K(a, (0.5 + d) * b, c, b, (0.5 + d) * c, b, 0.5 *
                c); d = 4 * (Math.SQRT2 - 1) / 3 * 0.4; J(a, 0.5 * b, 0.1 * c, !0, !0); K(a, (0.5 + d) * b, 0.1 * c, 0.9 * b, (0.5 - d) * c, 0.9 * b, 0.5 * c); K(a, 0.9 * b, (0.5 + d) * c, (0.5 + d) * b, 0.9 * c, 0.5 * b, 0.9 * c); K(a, (0.5 - d) * b, 0.9 * c, 0.1 * b, (0.5 + d) * c, 0.1 * b, 0.5 * c); K(a, 0.1 * b, (0.5 - d) * c, (0.5 - d) * b, 0.1 * c, 0.5 * b, 0.1 * c); b = a.s; b.G = new I(0.146, 0.146); b.H = new I(0.853, 0.853); b.wc = Xg; t.v(a); return b}, YinYang:function(a, b, c){var d = 0.5; a = t.u(); d = 0.5; J(a, 0.5 * b, 0, !0); a.arcTo(270, 180, 0.5 * b, 0.5 * b, 0.5 * b); K(a, 1 * b, d * c, 0, d * c, d * b, 0, !0); var d = 0.1, f = 0.25; J(a, (0.5 + d) * b, f * c, !0, !0); a.arcTo(0,
                - 360, 0.5 * b, c * f, d * b); M(a); J(a, 0.5 * b, 0, !1); a.arcTo(270, - 180, 0.5 * b, 0.5 * b, 0.5 * b); a.bb(!1); f = 0.75; J(a, (0.5 + d) * b, f * c, !0); a.arcTo(0, 360, 0.5 * b, c * f, d * b); M(a); b = a.s; b.wc = Xg; t.v(a); return b}, Peace:function(a, b, c){a = t.u(); var d = 4 * (Math.SQRT2 - 1) / 3 * 0.5; J(a, b, 0.5 * c, !0); K(a, b, (0.5 - d) * c, (0.5 + d) * b, 0, 0.5 * b, 0); K(a, (0.5 - d) * b, 0, 0, (0.5 - d) * c, 0, 0.5 * c); K(a, 0, (0.5 + d) * c, (0.5 - d) * b, c, 0.5 * b, c); K(a, (0.5 + d) * b, c, b, (0.5 + d) * c, b, 0.5 * c); d = 4 * (Math.SQRT2 - 1) / 3 * 0.4; J(a, 0.5 * b, 0.1 * c, !0, !0); K(a, (0.5 + d) * b, 0.1 * c, 0.9 * b, (0.5 - d) * c, 0.9 * b, 0.5 * c); K(a,
                0.9 * b, (0.5 + d) * c, (0.5 + d) * b, 0.9 * c, 0.5 * b, 0.9 * c); K(a, (0.5 - d) * b, 0.9 * c, 0.1 * b, (0.5 + d) * c, 0.1 * b, 0.5 * c); K(a, 0.1 * b, (0.5 - d) * c, (0.5 - d) * b, 0.1 * c, 0.5 * b, 0.1 * c); var d = 0.07, f = 0, g = - 0.707 * 0.11, h = 4 * (Math.SQRT2 - 1) / 3 * d; J(a, (0.5 + d + f) * b, (0.5 + g) * c, !0); K(a, (0.5 + d + f) * b, (0.5 - h + g) * c, (0.5 + h + f) * b, (0.5 - d + g) * c, (0.5 + f) * b, (0.5 - d + g) * c); K(a, (0.5 - h + f) * b, (0.5 - d + g) * c, (0.5 - d + f) * b, (0.5 - h + g) * c, (0.5 - d + f) * b, (0.5 + g) * c); K(a, (0.5 - d + f) * b, (0.5 + h + g) * c, (0.5 - h + f) * b, (0.5 + d + g) * c, (0.5 + f) * b, (0.5 + d + g) * c); K(a, (0.5 + h + f) * b, (0.5 + d + g) * c, (0.5 + d + f) * b, (0.5 + h + g) * c,
                (0.5 + d + f) * b, (0.5 + g) * c); d = 0.07; f = - 0.707 * 0.11; g = 0.707 * 0.11; h = 4 * (Math.SQRT2 - 1) / 3 * d; J(a, (0.5 + d + f) * b, (0.5 + g) * c, !0); K(a, (0.5 + d + f) * b, (0.5 - h + g) * c, (0.5 + h + f) * b, (0.5 - d + g) * c, (0.5 + f) * b, (0.5 - d + g) * c); K(a, (0.5 - h + f) * b, (0.5 - d + g) * c, (0.5 - d + f) * b, (0.5 - h + g) * c, (0.5 - d + f) * b, (0.5 + g) * c); K(a, (0.5 - d + f) * b, (0.5 + h + g) * c, (0.5 - h + f) * b, (0.5 + d + g) * c, (0.5 + f) * b, (0.5 + d + g) * c); K(a, (0.5 + h + f) * b, (0.5 + d + g) * c, (0.5 + d + f) * b, (0.5 + h + g) * c, (0.5 + d + f) * b, (0.5 + g) * c); d = 0.07; f = 0.707 * 0.11; g = 0.707 * 0.11; h = 4 * (Math.SQRT2 - 1) / 3 * d; J(a, (0.5 + d + f) * b, (0.5 + g) * c, !0); K(a, (0.5 +
                d + f) * b, (0.5 - h + g) * c, (0.5 + h + f) * b, (0.5 - d + g) * c, (0.5 + f) * b, (0.5 - d + g) * c); K(a, (0.5 - h + f) * b, (0.5 - d + g) * c, (0.5 - d + f) * b, (0.5 - h + g) * c, (0.5 - d + f) * b, (0.5 + g) * c); K(a, (0.5 - d + f) * b, (0.5 + h + g) * c, (0.5 - h + f) * b, (0.5 + d + g) * c, (0.5 + f) * b, (0.5 + d + g) * c); K(a, (0.5 + h + f) * b, (0.5 + d + g) * c, (0.5 + d + f) * b, (0.5 + h + g) * c, (0.5 + d + f) * b, (0.5 + g) * c); b = a.s; b.G = new I(0.146, 0.146); b.H = new I(0.853, 0.853); b.wc = Xg; t.v(a); return b}, NotAllowed:function(a, b, c){var d = H.va, f = 0.5 * d, g = 0.5; a = t.u(); J(a, 0.5 * b, (0.5 - g) * c, !0); K(a, (0.5 - f) * b, (0.5 - g) * c, (0.5 - g) * b, (0.5 - f) * c, (0.5 -
                g) * b, 0.5 * c); K(a, (0.5 - g) * b, (0.5 + f) * c, (0.5 - f) * b, (0.5 + g) * c, 0.5 * b, (0.5 + g) * c); K(a, (0.5 + f) * b, (0.5 + g) * c, (0.5 + g) * b, (0.5 + f) * c, (0.5 + g) * b, 0.5 * c); K(a, (0.5 + g) * b, (0.5 - f) * c, (0.5 + f) * b, (0.5 - g) * c, 0.5 * b, (0.5 - g) * c); var g = 0.4, f = 0.4 * d, d = t.K(), h = t.K(), k = t.K(), l = t.K(); H.Ui(0.5, 0.5 - g, 0.5 + f, 0.5 - g, 0.5 + g, 0.5 - f, 0.5 + g, 0.5, 0.42, d, h, k, l, l); var m = t.K(), n = t.K(), p = t.K(); H.Ui(0.5, 0.5 - g, 0.5 + f, 0.5 - g, 0.5 + g, 0.5 - f, 0.5 + g, 0.5, 0.58, l, l, p, m, n); var q = t.K(), r = t.K(), s = t.K(); H.Ui(0.5, 0.5 + g, 0.5 - f, 0.5 + g, 0.5 - g, 0.5 + f, 0.5 - g, 0.5, 0.42, q, r, s, l, l); var u =
                t.K(), v = t.K(), D = t.K(); H.Ui(0.5, 0.5 + g, 0.5 - f, 0.5 + g, 0.5 - g, 0.5 + f, 0.5 - g, 0.5, 0.58, l, l, D, u, v); J(a, D.x * b, D.y * c, !0, !0); K(a, u.x * b, u.y * c, v.x * b, v.y * c, (0.5 - g) * b, 0.5 * c); K(a, (0.5 - g) * b, (0.5 - f) * c, (0.5 - f) * b, (0.5 - g) * c, 0.5 * b, (0.5 - g) * c); K(a, d.x * b, d.y * c, h.x * b, h.y * c, k.x * b, k.y * c); a.lineTo(D.x * b, D.y * c); M(a); J(a, s.x * b, s.y * c, !0, !0); a.lineTo(p.x * b, p.y * c); K(a, m.x * b, m.y * c, n.x * b, n.y * c, (0.5 + g) * b, 0.5 * c); K(a, (0.5 + g) * b, (0.5 + f) * c, (0.5 + f) * b, (0.5 + g) * c, 0.5 * b, (0.5 + g) * c); K(a, q.x * b, q.y * c, r.x * b, r.y * c, s.x * b, s.y * c); M(a); t.B(d); t.B(h); t.B(k);
                t.B(l); t.B(m); t.B(n); t.B(p); t.B(q); t.B(r); t.B(s); t.B(u); t.B(v); t.B(D); b = a.s; t.v(a); b.wc = Xg; return b}, Fragile:function(a, b, c){a = t.u(); J(a, 0, 0, !0); a.lineTo(0.25 * b, 0); a.lineTo(0.2 * b, 0.15 * c); a.lineTo(0.3 * b, 0.25 * c); a.lineTo(0.29 * b, 0.33 * c); a.lineTo(0.35 * b, 0.25 * c); a.lineTo(0.3 * b, 0.15 * c); a.lineTo(0.4 * b, 0); a.lineTo(1 * b, 0); K(a, 1 * b, 0.25 * c, 0.75 * b, 0.5 * c, 0.55 * b, 0.5 * c); a.lineTo(0.55 * b, 0.9 * c); a.lineTo(0.7 * b, 0.9 * c); a.lineTo(0.7 * b, 1 * c); a.lineTo(0.3 * b, 1 * c); a.lineTo(0.3 * b, 0.9 * c); a.lineTo(0.45 * b, 0.9 * c); a.lineTo(0.45 *
                b, 0.5 * c); K(a, 0.25 * b, 0.5 * c, 0, 0.25 * c, 0, 0); M(a); b = a.s; b.G = new I(0.25, 0); b.H = new I(0.75, 0.4); t.v(a); return b}, HourGlass:function(a, b, c){a = t.u(); J(a, 0.65 * b, 0.5 * c, !0); a.lineTo(1 * b, 1 * c); a.lineTo(0, 1 * c); a.lineTo(0.35 * b, 0.5 * c); a.lineTo(0, 0); a.lineTo(1 * b, 0); M(a); b = a.s; t.v(a); return b}, Lightning:function(a, b, c){a = t.u(); J(a, 0 * b, 0.55 * c, !0); a.lineTo(0.75 * b, 0); a.lineTo(0.25 * b, 0.45 * c); a.lineTo(0.9 * b, 0.48 * c); a.lineTo(0.4 * b, 1 * c); a.lineTo(0.65 * b, 0.55 * c); M(a); b = a.s; t.v(a); return b}, Parallelogram1:function(a, b, c){a = a?
                a.Gc:0; 0 === a && (a = 0.1); var d = t.u(); J(d, a * b, 0, !0); d.lineTo(1 * b, 0); d.lineTo((1 - a) * b, 1 * c); d.lineTo(0, 1 * c); M(d); b = d.s; b.G = new I(a, 0); b.H = new I(1 - a, 1); t.v(d); return b}, Input:"Output", Output:function(a, b, c){a = t.u(); J(a, 0, 1 * c, !0); a.lineTo(0.1 * b, 0); a.lineTo(1 * b, 0); a.lineTo(0.9 * b, 1 * c); M(a); b = a.s; b.G = new I(0.1, 0); b.H = new I(0.9, 1); t.v(a); return b}, Parallelogram2:function(a, b, c){a = a?a.Gc:0; 0 === a && (a = 0.25); var d = t.u(); J(d, a * b, 0, !0); d.lineTo(1 * b, 0); d.lineTo((1 - a) * b, 1 * c); d.lineTo(0, 1 * c); M(d); b = d.s; b.G = new I(a, 0);
                b.H = new I(1 - a, 1); t.v(d); return b}, ThickCross:function(a, b, c){a = a?a.Gc:0; 0 === a && (a = 0.25); var d = t.u(); J(d, (0.5 - a / 2) * b, 0, !0); d.lineTo((0.5 + a / 2) * b, 0); d.lineTo((0.5 + a / 2) * b, (0.5 - a / 2) * c); d.lineTo(1 * b, (0.5 - a / 2) * c); d.lineTo(1 * b, (0.5 + a / 2) * c); d.lineTo((0.5 + a / 2) * b, (0.5 + a / 2) * c); d.lineTo((0.5 + a / 2) * b, 1 * c); d.lineTo((0.5 - a / 2) * b, 1 * c); d.lineTo((0.5 - a / 2) * b, (0.5 + a / 2) * c); d.lineTo(0, (0.5 + a / 2) * c); d.lineTo(0, (0.5 - a / 2) * c); d.lineTo((0.5 - a / 2) * b, (0.5 - a / 2) * c); M(d); b = d.s; b.G = new I(0.5 - a / 2, 0.5 - a / 2); b.H = new I(0.5 + a / 2, 0.5 + a / 2); t.v(d);
                return b}, ThickX:function(a, b, c){a = 0.25 / Math.SQRT2; var d = t.u(); J(d, 0.3 * b, 0, !0); d.lineTo(0.5 * b, 0.2 * c); d.lineTo(0.7 * b, 0); d.lineTo(1 * b, 0.3 * c); d.lineTo(0.8 * b, 0.5 * c); d.lineTo(1 * b, 0.7 * c); d.lineTo(0.7 * b, 1 * c); d.lineTo(0.5 * b, 0.8 * c); d.lineTo(0.3 * b, 1 * c); d.lineTo(0, 0.7 * c); d.lineTo(0.2 * b, 0.5 * c); d.lineTo(0, 0.3 * c); M(d); b = d.s; b.G = new I(0.5 - a, 0.5 - a); b.H = new I(0.5 + a, 0.5 + a); t.v(d); return b}, ThinCross:function(a, b, c){var d = a?a.Gc:0; 0 === d && (d = 0.1); a = t.u(); J(a, (0.5 - d / 2) * b, 0, !0); a.lineTo((0.5 + d / 2) * b, 0); a.lineTo((0.5 + d /
                2) * b, (0.5 - d / 2) * c); a.lineTo(1 * b, (0.5 - d / 2) * c); a.lineTo(1 * b, (0.5 + d / 2) * c); a.lineTo((0.5 + d / 2) * b, (0.5 + d / 2) * c); a.lineTo((0.5 + d / 2) * b, 1 * c); a.lineTo((0.5 - d / 2) * b, 1 * c); a.lineTo((0.5 - d / 2) * b, (0.5 + d / 2) * c); a.lineTo(0, (0.5 + d / 2) * c); a.lineTo(0, (0.5 - d / 2) * c); a.lineTo((0.5 - d / 2) * b, (0.5 - d / 2) * c); M(a); b = a.s; t.v(a); return b}, ThinX:function(a, b, c){a = t.u(); J(a, 0.1 * b, 0, !0); a.lineTo(0.5 * b, 0.4 * c); a.lineTo(0.9 * b, 0); a.lineTo(1 * b, 0.1 * c); a.lineTo(0.6 * b, 0.5 * c); a.lineTo(1 * b, 0.9 * c); a.lineTo(0.9 * b, 1 * c); a.lineTo(0.5 * b, 0.6 * c); a.lineTo(0.1 *
                b, 1 * c); a.lineTo(0, 0.9 * c); a.lineTo(0.4 * b, 0.5 * c); a.lineTo(0, 0.1 * c); M(a); return a.s}, RightTriangle:function(a, b, c){a = t.u(); J(a, 0, 0, !0); a.lineTo(1 * b, 1 * c); a.lineTo(0, 1 * c); M(a); b = a.s; b.G = new I(0, 0.5); b.H = new I(0.5, 1); t.v(a); return b}, RoundedIBeam:function(a, b, c){a = t.u(); J(a, 0, 0, !0); a.lineTo(1 * b, 0); K(a, 0.5 * b, 0.25 * c, 0.5 * b, 0.75 * c, 1 * b, 1 * c); a.lineTo(0, 1 * c); K(a, 0.5 * b, 0.75 * c, 0.5 * b, 0.25 * c, 0, 0); M(a); b = a.s; t.v(a); return b}, RoundedRectangle:function(a, b, c){var d = a?a.Gc:0; 0 >= d && (d = 5); d = Math.min(d, b / 3); d = Math.min(d,
                c / 3); a = d * H.va; var f = t.u(); J(f, d, 0, !0); f.lineTo(b - d, 0); K(f, b - a, 0, b, a, b, d); f.lineTo(b, c - d); K(f, b, c - a, b - a, c, b - d, c); f.lineTo(d, c); K(f, a, c, 0, c - a, 0, c - d); f.lineTo(0, d); K(f, 0, a, a, 0, d, 0); M(f); b = f.s; 1 < a?(b.G = new I(0, 0, a, a), b.H = new I(1, 1, - a, - a)):(b.G = Eb, b.H = Pb); t.v(f); return b}, Border:function(a, b, c){var d = a?a.Gc:0; 0 >= d && (d = 5); d = Math.min(d, b / 3); d = Math.min(d, c / 3); a = t.u(); J(a, d, 0, !0); a.lineTo(b - d, 0); K(a, b - 0, 0, b, 0, b, d); a.lineTo(b, c - d); K(a, b, c - 0, b - 0, c, b - d, c); a.lineTo(d, c); K(a, 0, c, 0, c - 0, 0, c - d); a.lineTo(0, d); K(a,
                0, 0, 0, 0, d, 0); M(a); b = a.s; b.G = Eb; b.H = Pb; t.v(a); return b}, SquareIBeam:function(a, b, c){var d = a?a.Gc:0; 0 === d && (d = 0.2); a = t.u(); J(a, 0, 0, !0); a.lineTo(1 * b, 0); a.lineTo(1 * b, d * c); a.lineTo((0.5 + d / 2) * b, d * c); a.lineTo((0.5 + d / 2) * b, (1 - d) * c); a.lineTo(1 * b, (1 - d) * c); a.lineTo(1 * b, 1 * c); a.lineTo(0, 1 * c); a.lineTo(0, (1 - d) * c); a.lineTo((0.5 - d / 2) * b, (1 - d) * c); a.lineTo((0.5 - d / 2) * b, d * c); a.lineTo(0, d * c); M(a); b = a.s; t.v(a); return b}, Trapezoid:function(a, b, c){a = a?a.Gc:0; 0 === a && (a = 0.2); var d = t.u(); J(d, a * b, 0, !0); d.lineTo((1 - a) * b, 0); d.lineTo(1 *
                b, 1 * c); d.lineTo(0, 1 * c); M(d); b = d.s; b.G = new I(a, 0); b.H = new I(1 - a, 1); t.v(d); return b}, ManualLoop:"ManualOperation", ManualOperation:function(a, b, c){var d = a?a.Gc:0; a = t.u(); J(a, d, 0, !0); a.lineTo(0, 0); a.lineTo(1 * b, 0); a.lineTo(0.9 * b, 1 * c); a.lineTo(0.1 * b, 1 * c); M(a); b = a.s; b.G = new I(0.1, 0); b.H = new I(0.9, 1); t.v(a); return b}, GenderMale:function(a, b, c){a = t.u(); var d = H.va, f = 0.4 * d, g = 0.4, h = t.K(), k = t.K(), l = t.K(), m = t.K(); J(a, (0.5 - g) * b, 0.5 * c, !0); K(a, (0.5 - g) * b, (0.5 - f) * c, (0.5 - f) * b, (0.5 - g) * c, 0.5 * b, (0.5 - g) * c); H.Ui(0.5, 0.5 -
                g, 0.5 + f, 0.5 - g, 0.5 + g, 0.5 - f, 0.5 + g, 0.5, 0.44, l, m, k, h, h); K(a, l.x * b, l.y * c, m.x * b, m.y * c, k.x * b, k.y * c); var n = t.lc(k.x, k.y); H.Ui(0.5, 0.5 - g, 0.5 + f, 0.5 - g, 0.5 + g, 0.5 - f, 0.5 + g, 0.5, 0.56, h, h, k, l, m); var p = t.lc(k.x, k.y); a.lineTo((0.1 * n.x + 0.855) * b, 0.1 * n.y * c); a.lineTo(0.85 * b, 0.1 * n.y * c); a.lineTo(0.85 * b, 0); a.lineTo(1 * b, 0); a.lineTo(1 * b, 0.15 * c); a.lineTo((0.1 * p.x + 0.9) * b, 0.15 * c); a.lineTo((0.1 * p.x + 0.9) * b, (0.1 * p.y + 0.05 * 0.9) * c); a.lineTo(p.x * b, p.y * c); K(a, l.x * b, l.y * c, m.x * b, m.y * c, (0.5 + g) * b, 0.5 * c); K(a, (0.5 + g) * b, (0.5 + f) * c, (0.5 + f) * b, (0.5 +
                g) * c, 0.5 * b, (0.5 + g) * c); K(a, (0.5 - f) * b, (0.5 + g) * c, (0.5 - g) * b, (0.5 + f) * c, (0.5 - g) * b, 0.5 * c); g = 0.35; f = 0.35 * d; J(a, 0.5 * b, (0.5 - g) * c, !0, !0); K(a, (0.5 - f) * b, (0.5 - g) * c, (0.5 - g) * b, (0.5 - f) * c, (0.5 - g) * b, 0.5 * c); K(a, (0.5 - g) * b, (0.5 + f) * c, (0.5 - f) * b, (0.5 + g) * c, 0.5 * b, (0.5 + g) * c); K(a, (0.5 + f) * b, (0.5 + g) * c, (0.5 + g) * b, (0.5 + f) * c, (0.5 + g) * b, 0.5 * c); K(a, (0.5 + g) * b, (0.5 - f) * c, (0.5 + f) * b, (0.5 - g) * c, 0.5 * b, (0.5 - g) * c); J(a, (0.5 - g) * b, 0.5 * c, !0); t.B(h); t.B(k); t.B(l); t.B(m); t.B(n); t.B(p); b = a.s; b.G = new I(0.202, 0.257); b.H = new I(0.692, 0.839); b.wc = Xg; t.v(a);
                return b}, GenderFemale:function(a, b, c){a = t.u(); var d = 0.375, f = 0, g = - 0.125, h = 4 * (Math.SQRT2 - 1) / 3 * d; J(a, (0.525 + f) * b, (0.5 + d + g) * c, !0); K(a, (0.5 + h + f) * b, (0.5 + d + g) * c, (0.5 + d + f) * b, (0.5 + h + g) * c, (0.5 + d + f) * b, (0.5 + g) * c); K(a, (0.5 + d + f) * b, (0.5 - h + g) * c, (0.5 + h + f) * b, (0.5 - d + g) * c, (0.5 + f) * b, (0.5 - d + g) * c); K(a, (0.5 - h + f) * b, (0.5 - d + g) * c, (0.5 - d + f) * b, (0.5 - h + g) * c, (0.5 - d + f) * b, (0.5 + g) * c); K(a, (0.5 - d + f) * b, (0.5 + h + g) * c, (0.5 - h + f) * b, (0.5 + d + g) * c, (0.475 + f) * b, (0.5 + d + g) * c); a.lineTo(0.475 * b, 0.85 * c); a.lineTo(0.425 * b, 0.85 * c); a.lineTo(0.425 * b, 0.9 * c);
                a.lineTo(0.475 * b, 0.9 * c); a.lineTo(0.475 * b, 1 * c); a.lineTo(0.525 * b, 1 * c); a.lineTo(0.525 * b, 0.9 * c); a.lineTo(0.575 * b, 0.9 * c); a.lineTo(0.575 * b, 0.85 * c); a.lineTo(0.525 * b, 0.85 * c); M(a); d = 0.325; f = 0; g = - 0.125; h = 4 * (Math.SQRT2 - 1) / 3 * d; J(a, (0.5 + d + f) * b, (0.5 + g) * c, !0, !0); K(a, (0.5 + d + f) * b, (0.5 + h + g) * c, (0.5 + h + f) * b, (0.5 + d + g) * c, (0.5 + f) * b, (0.5 + d + g) * c); K(a, (0.5 - h + f) * b, (0.5 + d + g) * c, (0.5 - d + f) * b, (0.5 + h + g) * c, (0.5 - d + f) * b, (0.5 + g) * c); K(a, (0.5 - d + f) * b, (0.5 - h + g) * c, (0.5 - h + f) * b, (0.5 - d + g) * c, (0.5 + f) * b, (0.5 - d + g) * c); K(a, (0.5 + h + f) * b, (0.5 - d + g) * c,
                (0.5 + d + f) * b, (0.5 - h + g) * c, (0.5 + d + f) * b, (0.5 + g) * c); J(a, (0.525 + f) * b, (0.5 + d + g) * c, !0); b = a.s; b.G = new I(0.232, 0.136); b.H = new I(0.782, 0.611); b.wc = Xg; t.v(a); return b}, PlusLine:function(a, b, c){a = t.u(); J(a, 0, 0.5 * c, !1); a.lineTo(1 * b, 0.5 * c); a.moveTo(0.5 * b, 0); a.lineTo(0.5 * b, 1 * c); b = a.s; t.v(a); return b}, XLine:function(a, b, c){a = t.u(); J(a, 0, 1 * c, !1); a.lineTo(1 * b, 0); a.moveTo(0, 0); a.lineTo(1 * b, 1 * c); b = a.s; t.v(a); return b}, AsteriskLine:function(a, b, c){a = t.u(); var d = 0.2 / Math.SQRT2; J(a, d * b, (1 - d) * c, !1); a.lineTo((1 - d) * b, d * c);
                a.moveTo(d * b, d * c); a.lineTo((1 - d) * b, (1 - d) * c); a.moveTo(0 * b, 0.5 * c); a.lineTo(1 * b, 0.5 * c); a.moveTo(0.5 * b, 0 * c); a.lineTo(0.5 * b, 1 * c); b = a.s; t.v(a); return b}, CircleLine:function(a, b, c){var d = 0.5 * H.va; a = t.u(); J(a, 1 * b, 0.5 * c, !1); K(a, 1 * b, (0.5 + d) * c, (0.5 + d) * b, 1 * c, 0.5 * b, 1 * c); K(a, (0.5 - d) * b, 1 * c, 0, (0.5 + d) * c, 0, 0.5 * c); K(a, 0, (0.5 - d) * c, (0.5 - d) * b, 0, 0.5 * b, 0); K(a, (0.5 + d) * b, 0, 1 * b, (0.5 - d) * c, 1 * b, 0.5 * c); b = a.s; b.G = new I(0.146, 0.146); b.H = new I(0.853, 0.853); b.wc = Xg; t.v(a); return b}, Pie:function(a, b, c){a = t.u(); var d = 4 * (Math.SQRT2 - 1) /
                3 * 0.5; J(a, (0.5 * Math.SQRT2 / 2 + 0.5) * b, (0.5 - 0.5 * Math.SQRT2 / 2) * c, !0); K(a, 0.7 * b, 0 * c, 0.5 * b, 0 * c, 0.5 * b, 0 * c); K(a, (0.5 - d + 0) * b, 0 * c, 0 * b, (0.5 - d + 0) * c, 0 * b, 0.5 * c); K(a, 0 * b, (0.5 + d + 0) * c, (0.5 - d + 0) * b, 1 * c, 0.5 * b, 1 * c); K(a, (0.5 + d + 0) * b, 1 * c, 1 * b, (0.5 + d + 0) * c, 1 * b, 0.5 * c); a.lineTo(0.5 * b, 0.5 * c); M(a); b = a.s; t.v(a); return b}, PiePiece:function(a, b, c){var d = H.va / Math.SQRT2 * 0.5, f = Math.SQRT2 / 2, g = 1 - Math.SQRT2 / 2; a = t.u(); J(a, b, c, !0); K(a, b, (1 - d) * c, (f + d) * b, (g + d) * c, f * b, g * c); a.lineTo(0, c); M(a); b = a.s; t.v(a); return b}, StopSign:function(a, b, c){a =
                1 / (Math.SQRT2 + 2); var d = t.u(); J(d, a * b, 0, !0); d.lineTo((1 - a) * b, 0); d.lineTo(1 * b, a * c); d.lineTo(1 * b, (1 - a) * c); d.lineTo((1 - a) * b, 1 * c); d.lineTo(a * b, 1 * c); d.lineTo(0, (1 - a) * c); d.lineTo(0, a * c); M(d); b = d.s; b.G = new I(a / 2, a / 2); b.H = new I(1 - a / 2, 1 - a / 2); t.v(d); return b}, LogicImplies:function(a, b, c){var d = a?a.Gc:0; 0 === d && (d = 0.2); a = t.u(); J(a, (1 - d) * b, 0 * c, !1); a.lineTo(1 * b, 0.5 * c); a.lineTo((1 - d) * b, c); a.moveTo(0, 0.5 * c); a.lineTo(b, 0.5 * c); b = a.s; b.G = Eb; b.H = new I(0.8, 0.5); t.v(a); return b}, LogicIff:function(a, b, c){var d = a?a.Gc:0;
                0 === d && (d = 0.2); a = t.u(); J(a, (1 - d) * b, 0 * c, !1); a.lineTo(1 * b, 0.5 * c); a.lineTo((1 - d) * b, c); a.moveTo(0, 0.5 * c); a.lineTo(b, 0.5 * c); a.moveTo(d * b, 0); a.lineTo(0, 0.5 * c); a.lineTo(d * b, c); b = a.s; b.G = new I(0.2, 0); b.H = new I(0.8, 0.5); t.v(a); return b}, LogicNot:function(a, b, c){a = t.u(); J(a, 0, 0, !1); a.lineTo(1 * b, 0); a.lineTo(1 * b, 1 * c); b = a.s; t.v(a); return b}, LogicAnd:function(a, b, c){a = t.u(); J(a, 0, 1 * c, !1); a.lineTo(0.5 * b, 0); a.lineTo(1 * b, 1 * c); b = a.s; b.G = new I(0.25, 0.5); b.H = new I(0.75, 1); t.v(a); return b}, LogicOr:function(a, b, c){a = t.u();
                J(a, 0, 0, !1); a.lineTo(0.5 * b, 1 * c); a.lineTo(1 * b, 0); b = a.s; b.G = new I(0.219, 0); b.H = new I(0.78, 0.409); t.v(a); return b}, LogicXor:function(a, b, c){a = t.u(); J(a, 0.5 * b, 0, !1); a.lineTo(0.5 * b, 1 * c); a.moveTo(0, 0.5 * c); a.lineTo(1 * b, 0.5 * c); var d = 0.5 * H.va; K(a, 1 * b, (0.5 + d) * c, (0.5 + d) * b, 1 * c, 0.5 * b, 1 * c); K(a, (0.5 - d) * b, 1 * c, 0, (0.5 + d) * c, 0, 0.5 * c); K(a, 0, (0.5 - d) * c, (0.5 - d) * b, 0, 0.5 * b, 0); K(a, (0.5 + d) * b, 0, 1 * b, (0.5 - d) * c, 1 * b, 0.5 * c); b = a.s; b.wc = Xg; t.v(a); return b}, LogicTruth:function(a, b, c){a = t.u(); J(a, 0, 0, !1); a.lineTo(1 * b, 0); a.moveTo(0.5 *
                b, 0); a.lineTo(0.5 * b, 1 * c); b = a.s; t.v(a); return b}, LogicFalsity:function(a, b, c){a = t.u(); J(a, 0, 1 * c, !1); a.lineTo(1 * b, 1 * c); a.moveTo(0.5 * b, 1 * c); a.lineTo(0.5 * b, 0); b = a.s; t.v(a); return b}, LogicThereExists:function(a, b, c){a = t.u(); J(a, 0, 0, !1); a.lineTo(1 * b, 0); a.lineTo(1 * b, 0.5 * c); a.lineTo(0, 0.5 * c); a.moveTo(1 * b, 0.5 * c); a.lineTo(1 * b, 1 * c); a.lineTo(0, 1 * c); b = a.s; t.v(a); return b}, LogicForAll:function(a, b, c){a = t.u(); J(a, 0, 0, !1); a.lineTo(0.5 * b, 1 * c); a.lineTo(1 * b, 0); a.moveTo(0.25 * b, 0.5 * c); a.lineTo(0.75 * b, 0.5 * c); b = a.s; b.G =
                new I(0.25, 0); b.H = new I(0.75, 0.5); t.v(a); return b}, LogicIsDefinedAs:function(a, b, c){a = t.u(); J(a, 0, 0, !1); a.lineTo(b, 0); a.moveTo(0, 0.5 * c); a.lineTo(b, 0.5 * c); a.moveTo(0, c); a.lineTo(b, c); b = a.s; b.G = new I(0.01, 0.01); b.H = new I(0.99, 0.49); t.v(a); return b}, LogicIntersect:function(a, b, c){var d = 0.5 * H.va; a = t.u(); J(a, 0, 1 * c, !1); a.lineTo(0, 0.5 * c); K(a, 0, (0.5 - d) * c, (0.5 - d) * b, 0, 0.5 * b, 0); K(a, (0.5 + d) * b, 0, 1 * b, (0.5 - d) * c, 1 * b, 0.5 * c); a.lineTo(1 * b, 1 * c); b = a.s; b.G = new I(0, 0.5); b.H = Pb; t.v(a); return b}, LogicUnion:function(a, b, c){var d =
                0.5 * H.va; a = t.u(); J(a, 1 * b, 0, !1); a.lineTo(1 * b, 0.5 * c); K(a, 1 * b, (0.5 + d) * c, (0.5 + d) * b, 1 * c, 0.5 * b, 1 * c); K(a, (0.5 - d) * b, 1 * c, 0, (0.5 + d) * c, 0, 0.5 * c); a.lineTo(0, 0); b = a.s; b.G = Eb; b.H = new I(1, 0.5); t.v(a); return b}, Arrow:function(a, b, c){var d = a?a.Gc:0, f = a?a.Et:0; 0 === d && (d = 0.3); 0 === f && (f = 0.3); a = t.u(); J(a, 0, (0.5 - f / 2) * c, !0); a.lineTo((1 - d) * b, (0.5 - f / 2) * c); a.lineTo((1 - d) * b, 0); a.lineTo(1 * b, 0.5 * c); a.lineTo((1 - d) * b, 1 * c); a.lineTo((1 - d) * b, (0.5 + f / 2) * c); a.lineTo(0, (0.5 + f / 2) * c); M(a); b = a.s; b.G = new I(0, 0.5 - f / 2); d = H.il(0, 0.5 + f / 2, 1, 0.5 +
                f / 2, 1 - d, 1, 1, 0.5, t.K()); b.H = new I(d.x, d.y); t.B(d); t.v(a); return b}, ISOProcess:"Chevron", Chevron:function(a, b, c){a = t.u(); J(a, 0, 0, !0); a.lineTo(0.5 * b, 0); a.lineTo(1 * b, 0.5 * c); a.lineTo(0.5 * b, 1 * c); a.lineTo(0, 1 * c); a.lineTo(0.5 * b, 0.5 * c); M(a); b = a.s; t.v(a); return b}, DoubleArrow:function(a, b, c){a = t.u(); J(a, 0, 0, !0); a.lineTo(0.3 * b, 0.214 * c); a.lineTo(0.3 * b, 0); a.lineTo(1 * b, 0.5 * c); a.lineTo(0.3 * b, 1 * c); a.lineTo(0.3 * b, 0.786 * c); a.lineTo(0, 1 * c); M(a); J(a, 0.3 * b, 0.214 * c, !1); a.lineTo(0.3 * b, 0.786 * c); a.bb(!1); b = a.s; t.v(a); return b},
                DoubleEndArrow:function(a, b, c){a = t.u(); J(a, 1 * b, 0.5 * c, !0); a.lineTo(0.7 * b, 1 * c); a.lineTo(0.7 * b, 0.7 * c); a.lineTo(0.3 * b, 0.7 * c); a.lineTo(0.3 * b, 1 * c); a.lineTo(0, 0.5 * c); a.lineTo(0.3 * b, 0); a.lineTo(0.3 * b, 0.3 * c); a.lineTo(0.7 * b, 0.3 * c); a.lineTo(0.7 * b, 0); M(a); b = a.s; c = H.il(0, 0.5, 0.3, 0, 0, 0.3, 0.3, 0.3, t.K()); b.G = new I(c.x, c.y); c = H.il(0.7, 1, 1, 0.5, 0.7, 0.7, 1, 0.7, c); b.H = new I(c.x, c.y); t.B(c); t.v(a); return b}, IBeamArrow:function(a, b, c){a = t.u(); J(a, 1 * b, 0.5 * c, !0); a.lineTo(0.7 * b, 1 * c); a.lineTo(0.7 * b, 0.7 * c); a.lineTo(0.2 * b, 0.7 *
                c); a.lineTo(0.2 * b, 1 * c); a.lineTo(0, 1 * c); a.lineTo(0, 0); a.lineTo(0.2 * b, 0); a.lineTo(0.2 * b, 0.3 * c); a.lineTo(0.7 * b, 0.3 * c); a.lineTo(0.7 * b, 0); M(a); b = a.s; b.G = new I(0, 0.3); c = H.il(0.7, 1, 1, 0.5, 0.7, 0.7, 1, 0.7, t.K()); b.H = new I(c.x, c.y); t.B(c); t.v(a); return b}, Pointer:function(a, b, c){a = t.u(); J(a, 1 * b, 0.5 * c, !0); a.lineTo(0, 1 * c); a.lineTo(0.2 * b, 0.5 * c); a.lineTo(0, 0); M(a); b = a.s; b.G = new I(0.2, 0.35); c = H.il(0.2, 0.65, 1, 0.65, 0, 1, 1, 0.5, t.K()); b.H = new I(c.x, c.y); t.B(c); t.v(a); return b}, RoundedPointer:function(a, b, c){a = t.u(); J(a,
                1 * b, 0.5 * c, !0); a.lineTo(0, 1 * c); K(a, 0.5 * b, 0.75 * c, 0.5 * b, 0.25 * c, 0, 0); M(a); b = a.s; b.G = new I(0.4, 0.35); c = H.il(0.2, 0.65, 1, 0.65, 0, 1, 1, 0.5, t.K()); b.H = new I(c.x, c.y); t.B(c); t.v(a); return b}, SplitEndArrow:function(a, b, c){a = t.u(); J(a, 1 * b, 0.5 * c, !0); a.lineTo(0.7 * b, 1 * c); a.lineTo(0.7 * b, 0.7 * c); a.lineTo(0, 0.7 * c); a.lineTo(0.2 * b, 0.5 * c); a.lineTo(0, 0.3 * c); a.lineTo(0.7 * b, 0.3 * c); a.lineTo(0.7 * b, 0); M(a); b = a.s; b.G = new I(0.2, 0.3); c = H.il(0.7, 1, 1, 0.5, 0.7, 0.7, 1, 0.7, t.K()); b.H = new I(c.x, c.y); t.B(c); t.v(a); return b}, MessageToUser:"SquareArrow",
                SquareArrow:function(a, b, c){a = t.u(); J(a, 1 * b, 0.5 * c, !0); a.lineTo(0.7 * b, 1 * c); a.lineTo(0, 1 * c); a.lineTo(0, 0); a.lineTo(0.7 * b, 0); M(a); b = a.s; b.G = Eb; b.H = new I(0.7, 1); t.v(a); return b}, Cone1:function(a, b, c){var d = H.va; a = 0.5 * d; var f = 0.1 * d, d = t.u(); J(d, 0, 0.9 * c, !0); d.lineTo(0.5 * b, 0); d.lineTo(1 * b, 0.9 * c); K(d, 1 * b, (0.9 + f) * c, (0.5 + a) * b, 1 * c, 0.5 * b, 1 * c); K(d, (0.5 - a) * b, 1 * c, 0, (0.9 + f) * c, 0, 0.9 * c); M(d); b = d.s; b.G = new I(0.25, 0.5); b.H = new I(0.75, 0.97); t.v(d); return b}, Cone2:function(a, b, c){a = t.u(); J(a, 0, 0.9 * c, !0); K(a, (1 - 0.85 / 0.9) *
                b, 1 * c, 0.85 / 0.9 * b, 1 * c, 1 * b, 0.9 * c); a.lineTo(0.5 * b, 0); a.lineTo(0, 0.9 * c); M(a); J(a, 0, 0.9 * c, !1); K(a, (1 - 0.85 / 0.9) * b, 0.8 * c, 0.85 / 0.9 * b, 0.8 * c, 1 * b, 0.9 * c); a.bb(!1); b = a.s; b.G = new I(0.25, 0.5); b.H = new I(0.75, 0.82); t.v(a); return b}, Cube1:function(a, b, c){a = t.u(); J(a, 0.5 * b, 1 * c, !0); a.lineTo(1 * b, 0.85 * c); a.lineTo(1 * b, 0.15 * c); a.lineTo(0.5 * b, 0 * c); a.lineTo(0 * b, 0.15 * c); a.lineTo(0 * b, 0.85 * c); M(a); J(a, 0.5 * b, 1 * c, !1); a.lineTo(0.5 * b, 0.3 * c); a.lineTo(0, 0.15 * c); a.moveTo(0.5 * b, 0.3 * c); a.lineTo(1 * b, 0.15 * c); a.bb(!1); b = a.s; b.G = new I(0,
                0.3); b.H = new I(0.5, 0.85); t.v(a); return b}, Cube2:function(a, b, c){a = t.u(); J(a, 0, 0.3 * c, !0); a.lineTo(0 * b, 1 * c); a.lineTo(0.7 * b, c); a.lineTo(1 * b, 0.7 * c); a.lineTo(1 * b, 0 * c); a.lineTo(0.3 * b, 0 * c); M(a); J(a, 0, 0.3 * c, !1); a.lineTo(0.7 * b, 0.3 * c); a.lineTo(1 * b, 0 * c); a.moveTo(0.7 * b, 0.3 * c); a.lineTo(0.7 * b, 1 * c); a.bb(!1); b = a.s; b.G = new I(0, 0.3); b.H = new I(0.7, 1); t.v(a); return b}, MagneticData:"Cylinder1", Cylinder1:function(a, b, c){var d = H.va; a = 0.5 * d; var f = 0.1 * d, d = t.u(); J(d, 0, 0.1 * c, !0); K(d, 0, (0.1 - f) * c, (0.5 - a) * b, 0, 0.5 * b, 0); K(d, (0.5 +
                a) * b, 0, 1 * b, (0.1 - f) * c, 1 * b, 0.1 * c); d.lineTo(b, 0.9 * c); K(d, 1 * b, (0.9 + f) * c, (0.5 + a) * b, 1 * c, 0.5 * b, 1 * c); K(d, (0.5 - a) * b, 1 * c, 0, (0.9 + f) * c, 0, 0.9 * c); d.lineTo(0, 0.1 * c); J(d, 0, 0.1 * c, !1); K(d, 0, (0.1 + f) * c, (0.5 - a) * b, 0.2 * c, 0.5 * b, 0.2 * c); K(d, (0.5 + a) * b, 0.2 * c, 1 * b, (0.1 + f) * c, 1 * b, 0.1 * c); d.bb(!1); b = d.s; b.G = new I(0, 0.2); b.H = new I(1, 0.9); t.v(d); return b}, Cylinder2:function(a, b, c){var d = H.va; a = 0.5 * d; var f = 0.1 * d, d = t.u(); J(d, 0, 0.9 * c, !0); d.lineTo(0, 0.1 * c); K(d, 0, (0.1 - f) * c, (0.5 - a) * b, 0, 0.5 * b, 0); K(d, (0.5 + a) * b, 0, 1 * b, (0.1 - f) * c, 1 * b, 0.1 * c); d.lineTo(1 *
                b, 0.9 * c); K(d, 1 * b, (0.9 + f) * c, (0.5 + a) * b, 1 * c, 0.5 * b, 1 * c); K(d, (0.5 - a) * b, 1 * c, 0, (0.9 + f) * c, 0, 0.9 * c); J(d, 0, 0.9 * c, !1); K(d, 0, (0.9 - f) * c, (0.5 - a) * b, 0.8 * c, 0.5 * b, 0.8 * c); K(d, (0.5 + a) * b, 0.8 * c, 1 * b, (0.9 - f) * c, 1 * b, 0.9 * c); d.bb(!1); b = d.s; b.G = new I(0, 0.1); b.H = new I(1, 0.8); t.v(d); return b}, Cylinder3:function(a, b, c){var d = H.va; a = 0.1 * d; var f = 0.5 * d, d = t.u(); J(d, 0.1 * b, 0, !0); d.lineTo(0.9 * b, 0); K(d, (0.9 + a) * b, 0, 1 * b, (0.5 - f) * c, 1 * b, 0.5 * c); K(d, 1 * b, (0.5 + f) * c, (0.9 + a) * b, 1 * c, 0.9 * b, 1 * c); d.lineTo(0.1 * b, 1 * c); K(d, (0.1 - a) * b, 1 * c, 0, (0.5 + f) * c, 0, 0.5 *
                c); K(d, 0, (0.5 - f) * c, (0.1 - a) * b, 0, 0.1 * b, 0); J(d, 0.1 * b, 0, !1); K(d, (0.1 + a) * b, 0, 0.2 * b, (0.5 - f) * c, 0.2 * b, 0.5 * c); K(d, 0.2 * b, (0.5 + f) * c, (0.1 + a) * b, 1 * c, 0.1 * b, 1 * c); d.bb(!1); b = d.s; b.G = new I(0.2, 0); b.H = new I(0.9, 1); t.v(d); return b}, DirectData:"Cylinder4", Cylinder4:function(a, b, c){var d = H.va; a = 0.1 * d; var f = 0.5 * d, d = t.u(); J(d, 0.9 * b, 0, !0); K(d, (0.9 + a) * b, 0, 1 * b, (0.5 - f) * c, 1 * b, 0.5 * c); K(d, 1 * b, (0.5 + f) * c, (0.9 + a) * b, 1 * c, 0.9 * b, 1 * c); d.lineTo(0.1 * b, 1 * c); K(d, (0.1 - a) * b, 1 * c, 0, (0.5 + f) * c, 0, 0.5 * c); K(d, 0, (0.5 - f) * c, (0.1 - a) * b, 0, 0.1 * b, 0); d.lineTo(0.9 *
                b, 0); J(d, 0.9 * b, 0, !1); K(d, (0.9 - a) * b, 0, 0.8 * b, (0.5 - f) * c, 0.8 * b, 0.5 * c); K(d, 0.8 * b, (0.5 + f) * c, (0.9 - a) * b, 1 * c, 0.9 * b, 1 * c); d.bb(!1); b = d.s; b.G = new I(0.1, 0); b.H = new I(0.8, 1); t.v(d); return b}, Prism1:function(a, b, c){a = t.u(); J(a, 0.25 * b, 0.25 * c, !0); a.lineTo(0.75 * b, 0); a.lineTo(b, 0.5 * c); a.lineTo(0.5 * b, c); a.lineTo(0, c); M(a); J(a, 0.25 * b, 0.25 * c, !1); a.lineTo(0.5 * b, c); a.bb(!1); b = a.s; b.G = new I(0.408, 0.172); b.H = new I(0.833, 0.662); t.v(a); return b}, Prism2:function(a, b, c){a = t.u(); J(a, 0, 0.25 * c, !0); a.lineTo(0.75 * b, 0); a.lineTo(1 * b,
                0.25 * c); a.lineTo(0.75 * b, 0.75 * c); a.lineTo(0, 1 * c); M(a); J(a, 0, c, !1); a.lineTo(0.25 * b, 0.5 * c); a.lineTo(b, 0.25 * c); a.moveTo(0, 0.25 * c); a.lineTo(0.25 * b, 0.5 * c); a.bb(!1); b = a.s; b.G = new I(0.25, 0.5); b.H = new I(0.75, 0.75); t.v(a); return b}, Pyramid1:function(a, b, c){a = t.u(); J(a, 0.5 * b, 0, !0); a.lineTo(b, 0.75 * c); a.lineTo(0.5 * b, 1 * c); a.lineTo(0, 0.75 * c); M(a); J(a, 0.5 * b, 0, !1); a.lineTo(0.5 * b, 1 * c); a.bb(!1); b = a.s; b.G = new I(0.25, 0.367); b.H = new I(0.75, 0.875); t.v(a); return b}, Pyramid2:function(a, b, c){a = t.u(); J(a, 0.5 * b, 0, !0); a.lineTo(b,
                0.85 * c); a.lineTo(0.5 * b, 1 * c); a.lineTo(0, 0.85 * c); M(a); J(a, 0.5 * b, 0, !1); a.lineTo(0.5 * b, 0.7 * c); a.lineTo(0, 0.85 * c); a.moveTo(0.5 * b, 0.7 * c); a.lineTo(1 * b, 0.85 * c); a.bb(!1); b = a.s; b.G = new I(0.25, 0.367); b.H = new I(0.75, 0.875); t.v(a); return b}, Actor:function(a, b, c){var d = H.va, f = 0.2 * d, g = 0.1 * d, h = 0.5, k = 0.1; a = t.u(); J(a, h * b, (k + 0.1) * c, !0); K(a, (h - f) * b, (k + 0.1) * c, (h - 0.2) * b, (k + g) * c, (h - 0.2) * b, k * c); K(a, (h - 0.2) * b, (k - g) * c, (h - f) * b, (k - 0.1) * c, h * b, (k - 0.1) * c); K(a, (h + f) * b, (k - 0.1) * c, (h + 0.2) * b, (k - g) * c, (h + 0.2) * b, k * c); K(a, (h + 0.2) * b, (k +
                g) * c, (h + f) * b, (k + 0.1) * c, h * b, (k + 0.1) * c); f = 0.05; g = d * f; J(a, 0.5 * b, 0.2 * c, !0); a.lineTo(0.95 * b, 0.2 * c); h = 0.95; k = 0.25; K(a, (h + g) * b, (k - f) * c, (h + f) * b, (k - g) * c, (h + f) * b, k * c); a.lineTo(1 * b, 0.6 * c); a.lineTo(0.85 * b, 0.6 * c); a.lineTo(0.85 * b, 0.35 * c); f = 0.025; g = d * f; h = 0.825; k = 0.35; K(a, (h + f) * b, (k - g) * c, (h + g) * b, (k - f) * c, h * b, (k - f) * c); K(a, (h - g) * b, (k - f) * c, (h - f) * b, (k - g) * c, (h - f) * b, k * c); a.lineTo(0.8 * b, 1 * c); a.lineTo(0.55 * b, 1 * c); a.lineTo(0.55 * b, 0.7 * c); f = 0.05; g = d * f; h = 0.5; k = 0.7; K(a, (h + f) * b, (k - g) * c, (h + g) * b, (k - f) * c, h * b, (k - f) * c); K(a, (h - g) * b,
                (k - f) * c, (h - f) * b, (k - g) * c, (h - f) * b, k * c); a.lineTo(0.45 * b, 1 * c); a.lineTo(0.2 * b, 1 * c); a.lineTo(0.2 * b, 0.35 * c); f = 0.025; g = d * f; h = 0.175; k = 0.35; K(a, (h + f) * b, (k - g) * c, (h + g) * b, (k - f) * c, h * b, (k - f) * c); K(a, (h - g) * b, (k - f) * c, (h - f) * b, (k - g) * c, (h - f) * b, k * c); a.lineTo(0.15 * b, 0.6 * c); a.lineTo(0 * b, 0.6 * c); a.lineTo(0 * b, 0.25 * c); f = 0.05; g = d * f; h = 0.05; k = 0.25; K(a, (h - f) * b, (k - g) * c, (h - g) * b, (k - f) * c, h * b, (k - f) * c); a.lineTo(0.5 * b, 0.2 * c); b = a.s; b.G = new I(0.2, 0.2); b.H = new I(0.8, 0.65); t.v(a); return b}, Card:function(a, b, c){a = t.u(); J(a, 1 * b, 0 * c, !0); a.lineTo(1 *
                b, 1 * c); a.lineTo(0 * b, 1 * c); a.lineTo(0 * b, 0.2 * c); a.lineTo(0.2 * b, 0 * c); M(a); b = a.s; b.G = new I(0, 0.2); b.H = Pb; t.v(a); return b}, Collate:function(a, b, c){a = t.u(); J(a, 0.5 * b, 0.5 * c, !0); a.lineTo(0, 0); a.lineTo(1 * b, 0); a.lineTo(0.5 * b, 0.5 * c); J(a, 0.5 * b, 0.5 * c, !0); a.lineTo(1 * b, 1 * c); a.lineTo(0, 1 * c); a.lineTo(0.5 * b, 0.5 * c); b = a.s; b.G = new I(0.25, 0); b.H = new I(0.75, 0.25); t.v(a); return b}, CreateRequest:function(a, b, c){a = a?a.Gc:0; 0 === a && (a = 0.1); var d = t.u(); J(d, 0, 0, !0); d.lineTo(1 * b, 0); d.lineTo(1 * b, 1 * c); d.lineTo(0, 1 * c); M(d); J(d, 0, a *
                c, !1); d.lineTo(1 * b, a * c); d.moveTo(0, (1 - a) * c); d.lineTo(1 * b, (1 - a) * c); d.bb(!1); b = d.s; b.G = new I(0, a); b.H = new I(1, 1 - a); t.v(d); return b}, Database:function(a, b, c){a = t.u(); var d = H.va, f = 0.5 * d, d = 0.1 * d; J(a, 1 * b, 0.1 * c, !0); a.lineTo(1 * b, 0.9 * c); K(a, 1 * b, (0.9 + d) * c, (0.5 + f) * b, 1 * c, 0.5 * b, 1 * c); K(a, (0.5 - f) * b, 1 * c, 0, (0.9 + d) * c, 0, 0.9 * c); a.lineTo(0, 0.1 * c); K(a, 0, (0.1 - d) * c, (0.5 - f) * b, 0, 0.5 * b, 0); K(a, (0.5 + f) * b, 0, 1 * b, (0.1 - d) * c, 1 * b, 0.1 * c); J(a, 1 * b, 0.1 * c, !1); K(a, 1 * b, (0.1 + d) * c, (0.5 + f) * b, 0.2 * c, 0.5 * b, 0.2 * c); K(a, (0.5 - f) * b, 0.2 * c, 0, (0.1 + d) *
                c, 0, 0.1 * c); a.moveTo(1 * b, 0.2 * c); K(a, 1 * b, (0.2 + d) * c, (0.5 + f) * b, 0.3 * c, 0.5 * b, 0.3 * c); K(a, (0.5 - f) * b, 0.3 * c, 0, (0.2 + d) * c, 0, 0.2 * c); a.moveTo(1 * b, 0.3 * c); K(a, 1 * b, (0.3 + d) * c, (0.5 + f) * b, 0.4 * c, 0.5 * b, 0.4 * c); K(a, (0.5 - f) * b, 0.4 * c, 0, (0.3 + d) * c, 0, 0.3 * c); a.bb(!1); b = a.s; b.G = new I(0, 0.4); b.H = new I(1, 0.9); t.v(a); return b}, StoredData:"DataStorage", DataStorage:function(a, b, c){a = t.u(); J(a, 0, 0, !0); a.lineTo(0.75 * b, 0); K(a, 1 * b, 0, 1 * b, 1 * c, 0.75 * b, 1 * c); a.lineTo(0, 1 * c); K(a, 0.25 * b, 0.9 * c, 0.25 * b, 0.1 * c, 0, 0); M(a); b = a.s; b.G = new I(0.226, 0); b.H = new I(0.81,
                1); t.v(a); return b}, DiskStorage:function(a, b, c){a = t.u(); var d = H.va, f = 0.5 * d, d = 0.1 * d; J(a, 1 * b, 0.1 * c, !0); a.lineTo(1 * b, 0.9 * c); K(a, 1 * b, (0.9 + d) * c, (0.5 + f) * b, 1 * c, 0.5 * b, 1 * c); K(a, (0.5 - f) * b, 1 * c, 0, (0.9 + d) * c, 0, 0.9 * c); a.lineTo(0, 0.1 * c); K(a, 0, (0.1 - d) * c, (0.5 - f) * b, 0, 0.5 * b, 0); K(a, (0.5 + f) * b, 0, 1 * b, (0.1 - d) * c, 1 * b, 0.1 * c); J(a, 1 * b, 0.1 * c, !1); K(a, 1 * b, (0.1 + d) * c, (0.5 + f) * b, 0.2 * c, 0.5 * b, 0.2 * c); K(a, (0.5 - f) * b, 0.2 * c, 0, (0.1 + d) * c, 0, 0.1 * c); a.moveTo(1 * b, 0.2 * c); K(a, 1 * b, (0.2 + d) * c, (0.5 + f) * b, 0.3 * c, 0.5 * b, 0.3 * c); K(a, (0.5 - f) * b, 0.3 * c, 0, (0.2 + d) *
                c, 0, 0.2 * c); a.bb(!1); b = a.s; b.G = new I(0, 0.3); b.H = new I(1, 0.9); t.v(a); return b}, Display:function(a, b, c){a = t.u(); J(a, 0.25 * b, 0, !0); a.lineTo(0.75 * b, 0); K(a, 1 * b, 0, 1 * b, 1 * c, 0.75 * b, 1 * c); a.lineTo(0.25 * b, 1 * c); a.lineTo(0, 0.5 * c); M(a); b = a.s; b.G = new I(0.25, 0); b.H = new I(0.75, 1); t.v(a); return b}, DividedEvent:function(a, b, c){a = a?a.Gc:0; 0 === a?a = 0.2:0.15 > a && (a = 0.15); var d = t.u(), f = 0.2 * H.va; J(d, 0, 0.2 * c, !0); K(d, 0, (0.2 - f) * c, (0.2 - f) * b, 0, 0.2 * b, 0); d.lineTo(0.8 * b, 0); K(d, (0.8 + f) * b, 0, 1 * b, (0.2 - f) * c, 1 * b, 0.2 * c); d.lineTo(1 * b, 0.8 * c);
                K(d, 1 * b, (0.8 + f) * c, (0.8 + f) * b, 1 * c, 0.8 * b, 1 * c); d.lineTo(0.2 * b, 1 * c); K(d, (0.2 - f) * b, 1 * c, 0, (0.8 + f) * c, 0, 0.8 * c); d.lineTo(0, 0.2 * c); J(d, 0, a * c, !1); d.lineTo(1 * b, a * c); d.bb(!1); b = d.s; b.G = new I(0, a); b.H = new I(1, 1 - a); t.v(d); return b}, DividedProcess:function(a, b, c){a = a?a.Gc:0; 0.1 > a && (a = 0.1); var d = t.u(); J(d, 0, 0, !0); d.lineTo(1 * b, 0); d.lineTo(1 * b, 1 * c); d.lineTo(0, 1 * c); M(d); J(d, 0, a * c, !1); d.lineTo(1 * b, a * c); d.bb(!1); b = d.s; b.G = new I(0, a); b.H = Pb; t.v(d); return b}, Document:function(a, b, c){c /= 0.8; a = t.u(); J(a, 0, 0.7 * c, !0); a.lineTo(0,
                0); a.lineTo(1 * b, 0); a.lineTo(1 * b, 0.7 * c); K(a, 0.5 * b, 0.4 * c, 0.5 * b, 1 * c, 0, 0.7 * c); M(a); b = a.s; b.G = Eb; b.H = new I(1, 0.6); t.v(a); return b}, ExternalOrganization:function(a, b, c){a = a?a.Gc:0; 0.2 > a && (a = 0.2); var d = t.u(); J(d, 0, 0, !0); d.lineTo(1 * b, 0); d.lineTo(1 * b, 1 * c); d.lineTo(0, 1 * c); M(d); J(d, a * b, 0, !1); d.lineTo(0, a * c); d.moveTo(1 * b, a * c); d.lineTo((1 - a) * b, 0); d.moveTo(0, (1 - a) * c); d.lineTo(a * b, 1 * c); d.moveTo((1 - a) * b, 1 * c); d.lineTo(1 * b, (1 - a) * c); d.bb(!1); b = d.s; b.G = new I(a / 2, a / 2); b.H = new I(1 - a / 2, 1 - a / 2); t.v(d); return b}, ExternalProcess:function(a,
                b, c){a = t.u(); J(a, 0.5 * b, 0, !0); a.lineTo(1 * b, 0.5 * c); a.lineTo(0.5 * b, 1 * c); a.lineTo(0, 0.5 * c); M(a); J(a, 0.1 * b, 0.4 * c, !1); a.lineTo(0.1 * b, 0.6 * c); a.moveTo(0.9 * b, 0.6 * c); a.lineTo(0.9 * b, 0.4 * c); a.moveTo(0.6 * b, 0.1 * c); a.lineTo(0.4 * b, 0.1 * c); a.moveTo(0.4 * b, 0.9 * c); a.lineTo(0.6 * b, 0.9 * c); a.bb(!1); b = a.s; b.G = new I(0.25, 0.25); b.H = new I(0.75, 0.75); t.v(a); return b}, File:function(a, b, c){a = t.u(); J(a, 0, 0, !0); a.lineTo(0.75 * b, 0); a.lineTo(1 * b, 0.25 * c); a.lineTo(1 * b, 1 * c); a.lineTo(0, 1 * c); M(a); J(a, 0.75 * b, 0, !1); a.lineTo(0.75 * b, 0.25 * c);
                a.lineTo(1 * b, 0.25 * c); a.bb(!1); b = a.s; b.G = new I(0, 0.25); b.H = Pb; t.v(a); return b}, Interrupt:function(a, b, c){a = t.u(); J(a, 1 * b, 0.5 * c, !0); a.lineTo(0, 1 * c); a.lineTo(0, 0); a.lineTo(1 * b, 0.5 * c); J(a, 1 * b, 0.5 * c, !1); a.lineTo(1 * b, 1 * c); J(a, 1 * b, 0.5 * c, !1); a.lineTo(1 * b, 0); b = a.s; b.G = new I(0, 0.25); b.H = new I(0.5, 0.75); t.v(a); return b}, InternalStorage:function(a, b, c){var d = a?a.Gc:0; a = a?a.Et:0; 0 === d && (d = 0.1); 0 === a && (a = 0.1); var f = t.u(); J(f, 0, 0, !0); f.lineTo(1 * b, 0); f.lineTo(1 * b, 1 * c); f.lineTo(0, 1 * c); M(f); J(f, d * b, 0, !1); f.lineTo(d *
                b, 1 * c); f.moveTo(0, a * c); f.lineTo(1 * b, a * c); f.bb(!1); b = f.s; b.G = new I(d, a); b.H = Pb; t.v(f); return b}, Junction:function(a, b, c){a = t.u(); var d = 1 / Math.SQRT2, f = (1 - 1 / Math.SQRT2) / 2, g = 0.5 * H.va; J(a, 1 * b, 0.5 * c, !0); K(a, 1 * b, (0.5 + g) * c, (0.5 + g) * b, 1 * c, 0.5 * b, 1 * c); K(a, (0.5 - g) * b, 1 * c, 0, (0.5 + g) * c, 0, 0.5 * c); K(a, 0, (0.5 - g) * c, (0.5 - g) * b, 0, 0.5 * b, 0); K(a, (0.5 + g) * b, 0, 1 * b, (0.5 - g) * c, 1 * b, 0.5 * c); J(a, (f + d) * b, (f + d) * c, !1); a.lineTo(f * b, f * c); a.moveTo(f * b, (f + d) * c); a.lineTo((f + d) * b, f * c); a.bb(!1); b = a.s; b.wc = Xg; t.v(a); return b}, LinedDocument:function(a,
                b, c){c /= 0.8; a = t.u(); J(a, 0, 0.7 * c, !0); a.lineTo(0, 0); a.lineTo(1 * b, 0); a.lineTo(1 * b, 0.7 * c); K(a, 0.5 * b, 0.4 * c, 0.5 * b, 1 * c, 0, 0.7 * c); M(a); J(a, 0.1 * b, 0, !1); a.lineTo(0.1 * b, 0.75 * c); a.bb(!1); b = a.s; b.G = new I(0.1, 0); b.H = new I(1, 0.6); t.v(a); return b}, LoopLimit:function(a, b, c){a = t.u(); J(a, 0, 1 * c, !0); a.lineTo(0, 0.25 * c); a.lineTo(0.25 * b, 0); a.lineTo(0.75 * b, 0); a.lineTo(1 * b, 0.25 * c); a.lineTo(1 * b, 1 * c); M(a); b = a.s; b.G = new I(0, 0.25); b.H = Pb; t.v(a); return b}, SequentialData:"MagneticTape", MagneticTape:function(a, b, c){a = t.u(); var d =
                0.5 * H.va; J(a, 0.5 * b, 1 * c, !0); K(a, (0.5 - d) * b, 1 * c, 0, (0.5 + d) * c, 0, 0.5 * c); K(a, 0, (0.5 - d) * c, (0.5 - d) * b, 0, 0.5 * b, 0); K(a, (0.5 + d) * b, 0, 1 * b, (0.5 - d) * c, 1 * b, 0.5 * c); K(a, 1 * b, (0.5 + d) * c, (0.5 + d) * b, 0.9 * c, 0.6 * b, 0.9 * c); a.lineTo(1 * b, 0.9 * c); a.lineTo(1 * b, 1 * c); a.lineTo(0.5 * b, 1 * c); b = a.s; b.G = new I(0.15, 0.15); b.H = new I(0.85, 0.8); t.v(a); return b}, ManualInput:function(a, b, c){a = t.u(); J(a, 1 * b, 0, !0); a.lineTo(1 * b, 1 * c); a.lineTo(0, 1 * c); a.lineTo(0, 0.25 * c); M(a); b = a.s; b.G = new I(0, 0.25); b.H = Pb; t.v(a); return b}, MessageFromUser:function(a, b, c){a =
                a?a.Gc:0; 0 === a && (a = 0.7); var d = t.u(); J(d, 0, 0, !0); d.lineTo(1 * b, 0); d.lineTo(a * b, 0.5 * c); d.lineTo(1 * b, 1 * c); d.lineTo(0, 1 * c); M(d); b = d.s; b.G = Eb; b.H = new I(a, 1); t.v(d); return b}, MicroformProcessing:function(a, b, c){a = a?a.Gc:0; 0 === a && (a = 0.25); var d = t.u(); J(d, 0, 0, !0); d.lineTo(0.5 * b, a * c); d.lineTo(1 * b, 0); d.lineTo(1 * b, 1 * c); d.lineTo(0.5 * b, (1 - a) * c); d.lineTo(0, 1 * c); M(d); b = d.s; b.G = new I(0, a); b.H = new I(1, 1 - a); t.v(d); return b}, MicroformRecording:function(a, b, c){a = t.u(); J(a, 0, 0, !0); a.lineTo(0.75 * b, 0.25 * c); a.lineTo(1 * b,
                0.15 * c); a.lineTo(1 * b, 0.85 * c); a.lineTo(0.75 * b, 0.75 * c); a.lineTo(0, 1 * c); M(a); b = a.s; b.G = new I(0, 0.25); b.H = new I(1, 0.75); t.v(a); return b}, MultiDocument:function(a, b, c){c /= 0.8; a = t.u(); J(a, b, 0, !0); a.lineTo(b, 0.5 * c); K(a, 0.96 * b, 0.47 * c, 0.93 * b, 0.45 * c, 0.9 * b, 0.44 * c); a.lineTo(0.9 * b, 0.6 * c); K(a, 0.86 * b, 0.57 * c, 0.83 * b, 0.55 * c, 0.8 * b, 0.54 * c); a.lineTo(0.8 * b, 0.7 * c); K(a, 0.4 * b, 0.4 * c, 0.4 * b, 1 * c, 0, 0.7 * c); a.lineTo(0, 0.2 * c); a.lineTo(0.1 * b, 0.2 * c); a.lineTo(0.1 * b, 0.1 * c); a.lineTo(0.2 * b, 0.1 * c); a.lineTo(0.2 * b, 0); M(a); J(a, 0.1 * b, 0.2 * c,
                !1); a.lineTo(0.8 * b, 0.2 * c); a.lineTo(0.8 * b, 0.54 * c); a.moveTo(0.2 * b, 0.1 * c); a.lineTo(0.9 * b, 0.1 * c); a.lineTo(0.9 * b, 0.44 * c); a.bb(!1); b = a.s; b.G = new I(0, 0.25); b.H = new I(0.8, 0.77); t.v(a); return b}, MultiProcess:function(a, b, c){a = t.u(); J(a, 0.1 * b, 0.1 * c, !0); a.lineTo(0.2 * b, 0.1 * c); a.lineTo(0.2 * b, 0); a.lineTo(1 * b, 0); a.lineTo(1 * b, 0.8 * c); a.lineTo(0.9 * b, 0.8 * c); a.lineTo(0.9 * b, 0.9 * c); a.lineTo(0.8 * b, 0.9 * c); a.lineTo(0.8 * b, 1 * c); a.lineTo(0, 1 * c); a.lineTo(0, 0.2 * c); a.lineTo(0.1 * b, 0.2 * c); M(a); J(a, 0.2 * b, 0.1 * c, !1); a.lineTo(0.9 * b,
                0.1 * c); a.lineTo(0.9 * b, 0.8 * c); a.moveTo(0.1 * b, 0.2 * c); a.lineTo(0.8 * b, 0.2 * c); a.lineTo(0.8 * b, 0.9 * c); a.bb(!1); b = a.s; b.G = new I(0, 0.2); b.H = new I(0.8, 1); t.v(a); return b}, OfflineStorage:function(a, b, c){a = a?a.Gc:0; 0 === a && (a = 0.1); var d = 1 - a, f = t.u(); J(f, 0, 0, !0); f.lineTo(1 * b, 0); f.lineTo(0.5 * b, 1 * c); M(f); J(f, 0.5 * a * b, a * c, !1); f.lineTo((1 - 0.5 * a) * b, a * c); f.bb(!1); b = f.s; b.G = new I(d / 4 + 0.5 * a, a); b.H = new I(3 * d / 4 + 0.5 * a, a + 0.5 * d); t.v(f); return b}, OffPageConnector:function(a, b, c){a = t.u(); J(a, 0, 0, !0); a.lineTo(0.75 * b, 0); a.lineTo(1 *
                b, 0.5 * c); a.lineTo(0.75 * b, 1 * c); a.lineTo(0, 1 * c); M(a); b = a.s; b.G = Eb; b.H = new I(0.75, 1); t.v(a); return b}, Or:function(a, b, c){a = t.u(); var d = 0.5 * H.va; J(a, 1 * b, 0.5 * c, !0); K(a, 1 * b, (0.5 + d) * c, (0.5 + d) * b, 1 * c, 0.5 * b, 1 * c); K(a, (0.5 - d) * b, 1 * c, 0, (0.5 + d) * c, 0, 0.5 * c); K(a, 0, (0.5 - d) * c, (0.5 - d) * b, 0, 0.5 * b, 0); K(a, (0.5 + d) * b, 0, 1 * b, (0.5 - d) * c, 1 * b, 0.5 * c); J(a, 1 * b, 0.5 * c, !1); a.lineTo(0, 0.5 * c); a.moveTo(0.5 * b, 1 * c); a.lineTo(0.5 * b, 0); a.bb(!1); b = a.s; b.wc = Xg; t.v(a); return b}, PaperTape:function(a, b, c){c /= 0.8; a = t.u(); J(a, 0, 0.7 * c, !0); a.lineTo(0,
                0.3 * c); K(a, 0.5 * b, 0.6 * c, 0.5 * b, 0, 1 * b, 0.3); a.lineTo(1 * b, 0.7 * c); K(a, 0.5 * b, 0.4 * c, 0.5 * b, 1 * c, 0, 0.7 * c); M(a); b = a.s; b.G = new I(0, 0.49); b.H = new I(1, 0.75); t.v(a); return b}, PrimitiveFromCall:function(a, b, c){var d = a?a.Gc:0; a = a?a.Et:0; 0 === d && (d = 0.1); 0 === a && (a = 0.3); var f = t.u(); J(f, 0, 0, !0); f.lineTo(1 * b, 0); f.lineTo((1 - a) * b, 0.5 * c); f.lineTo(1 * b, 1 * c); f.lineTo(0, 1 * c); M(f); b = f.s; b.G = new I(d, 0); b.H = new I(1 - a, 1); t.v(f); return b}, PrimitiveToCall:function(a, b, c){var d = a?a.Gc:0; a = a?a.Et:0; 0 === d && (d = 0.1); 0 === a && (a = 0.3); var f =
                t.u(); J(f, 0, 0, !0); f.lineTo((1 - a) * b, 0); f.lineTo(1 * b, 0.5 * c); f.lineTo((1 - a) * b, 1 * c); f.lineTo(0, 1 * c); M(f); b = f.s; b.G = new I(d, 0); b.H = new I(1 - a, 1); t.v(f); return b}, Subroutine:"Procedure", Procedure:function(a, b, c){a = a?a.Gc:0; 0 === a && (a = 0.1); var d = t.u(); J(d, 0, 0, !0); d.lineTo(1 * b, 0); d.lineTo(1 * b, 1 * c); d.lineTo(0, 1 * c); M(d); J(d, (1 - a) * b, 0, !1); d.lineTo((1 - a) * b, 1 * c); d.moveTo(a * b, 0); d.lineTo(a * b, 1 * c); d.bb(!1); b = d.s; b.G = new I(a, 0); b.H = new I(1 - a, 1); t.v(d); return b}, Process:function(a, b, c){a = a?a.Gc:0; 0 === a && (a = 0.1); var d =
                t.u(); J(d, 0, 0, !0); d.lineTo(1 * b, 0); d.lineTo(1 * b, 1 * c); d.lineTo(0, 1 * c); M(d); J(d, a * b, 0, !1); d.lineTo(a * b, 1 * c); d.bb(!1); b = d.s; b.G = new I(a, 0); b.H = Pb; t.v(d); return b}, Sort:function(a, b, c){a = t.u(); J(a, 0.5 * b, 0, !0); a.lineTo(1 * b, 0.5 * c); a.lineTo(0.5 * b, 1 * c); a.lineTo(0, 0.5 * c); M(a); J(a, 0, 0.5 * c, !1); a.lineTo(1 * b, 0.5 * c); a.bb(!1); b = a.s; b.G = new I(0.25, 0.25); b.H = new I(0.75, 0.5); t.v(a); return b}, Start:function(a, b, c){a = t.u(); J(a, 0.25 * b, 0, !0); J(a, 0.25 * b, 0, !0); a.arcTo(270, 180, 0.75 * b, 0.5 * c, 0.25 * b, 0.5 * c); a.arcTo(90, 180, 0.25 *
                b, 0.5 * c, 0.25 * b, 0.5 * c); J(a, 0.25 * b, 0, !1); a.lineTo(0.25 * b, 1 * c); a.moveTo(0.75 * b, 0); a.lineTo(0.75 * b, 1 * c); a.bb(!1); b = a.s; b.G = new I(0.25, 0); b.H = new I(0.75, 1); t.v(a); return b}, Terminator:function(a, b, c){a = t.u(); J(a, 0.25 * b, 0, !0); a.arcTo(270, 180, 0.75 * b, 0.5 * c, 0.25 * b, 0.5 * c); a.arcTo(90, 180, 0.25 * b, 0.5 * c, 0.25 * b, 0.5 * c); b = a.s; b.G = new I(0.23, 0); b.H = new I(0.77, 1); t.v(a); return b}, TransmittalTape:function(a, b, c){a = a?a.Gc:0; 0 === a && (a = 0.1); var d = t.u(); J(d, 0, 0, !0); d.lineTo(1 * b, 0); d.lineTo(1 * b, 1 * c); d.lineTo(0.75 * b, (1 - a) *
                c); d.lineTo(0, (1 - a) * c); M(d); b = d.s; b.G = Eb; b.H = new I(1, 1 - a); t.v(d); return b}, AndGate:function(a, b, c){a = t.u(); var d = 0.5 * H.va; J(a, 0, 0, !0); a.lineTo(0.5 * b, 0); K(a, (0.5 + d) * b, 0, 1 * b, (0.5 - d) * c, 1 * b, 0.5 * c); K(a, 1 * b, (0.5 + d) * c, (0.5 + d) * b, 1 * c, 0.5 * b, 1 * c); a.lineTo(0, 1 * c); M(a); b = a.s; b.G = Eb; b.H = new I(0.55, 1); t.v(a); return b}, Buffer:function(a, b, c){a = t.u(); J(a, 0, 0, !0); a.lineTo(1 * b, 0.5 * c); a.lineTo(0, 1 * c); M(a); b = a.s; b.G = new I(0, 0.25); b.H = new I(0.5, 0.75); t.v(a); return b}, Clock:function(a, b, c){a = t.u(); var d = 0.5 * H.va; J(a, 1 *
                b, 0.5 * c, !0); K(a, 1 * b, (0.5 + d) * c, (0.5 + d) * b, 1 * c, 0.5 * b, 1 * c); K(a, (0.5 - d) * b, 1 * c, 0, (0.5 + d) * c, 0, 0.5 * c); K(a, 0, (0.5 - d) * c, (0.5 - d) * b, 0, 0.5 * b, 0); K(a, (0.5 + d) * b, 0, 1 * b, (0.5 - d) * c, 1 * b, 0.5 * c); J(a, 1 * b, 0.5 * c, !1); a.lineTo(1 * b, 0.5 * c); J(a, 0.8 * b, 0.75 * c, !1); a.lineTo(0.8 * b, 0.25 * c); a.lineTo(0.6 * b, 0.25 * c); a.lineTo(0.6 * b, 0.75 * c); a.lineTo(0.4 * b, 0.75 * c); a.lineTo(0.4 * b, 0.25 * c); a.lineTo(0.2 * b, 0.25 * c); a.lineTo(0.2 * b, 0.75 * c); a.bb(!1); b = a.s; b.wc = Xg; t.v(a); return b}, Ground:function(a, b, c){a = t.u(); J(a, 0.5 * b, 0, !1); a.lineTo(0.5 * b, 0.4 * c);
                a.moveTo(0.2 * b, 0.6 * c); a.lineTo(0.8 * b, 0.6 * c); a.moveTo(0.3 * b, 0.8 * c); a.lineTo(0.7 * b, 0.8 * c); a.moveTo(0.4 * b, 1 * c); a.lineTo(0.6 * b, 1 * c); b = a.s; t.v(a); return b}, Inverter:function(a, b, c){a = t.u(); var d = 0.1 * H.va; J(a, 0.8 * b, 0.5 * c, !0); a.lineTo(0, 1 * c); a.lineTo(0, 0); a.lineTo(0.8 * b, 0.5 * c); J(a, 1 * b, 0.5 * c, !0); K(a, 1 * b, (0.5 + d) * c, (0.9 + d) * b, 0.6 * c, 0.9 * b, 0.6 * c); K(a, (0.9 - d) * b, 0.6 * c, 0.8 * b, (0.5 + d) * c, 0.8 * b, 0.5 * c); K(a, 0.8 * b, (0.5 - d) * c, (0.9 - d) * b, 0.4 * c, 0.9 * b, 0.4 * c); K(a, (0.9 + d) * b, 0.4 * c, 1 * b, (0.5 - d) * c, 1 * b, 0.5 * c); b = a.s; b.G = new I(0, 0.25);
                b.H = new I(0.4, 0.75); t.v(a); return b}, NandGate:function(a, b, c){a = t.u(); var d = H.va, f = 0.5 * d, g = 0.4 * d, d = 0.1 * d; J(a, 0.8 * b, 0.5 * c, !0); K(a, 0.8 * b, (0.5 + g) * c, (0.4 + f) * b, 1 * c, 0.4 * b, 1 * c); a.lineTo(0, 1 * c); a.lineTo(0, 0); a.lineTo(0.4 * b, 0); K(a, (0.4 + f) * b, 0, 0.8 * b, (0.5 - g) * c, 0.8 * b, 0.5 * c); J(a, 1 * b, 0.5 * c, !0); K(a, 1 * b, (0.5 + d) * c, (0.9 + d) * b, 0.6 * c, 0.9 * b, 0.6 * c); K(a, (0.9 - d) * b, 0.6 * c, 0.8 * b, (0.5 + d) * c, 0.8 * b, 0.5 * c); K(a, 0.8 * b, (0.5 - d) * c, (0.9 - d) * b, 0.4 * c, 0.9 * b, 0.4 * c); K(a, (0.9 + d) * b, 0.4 * c, 1 * b, (0.5 - d) * c, 1 * b, 0.5 * c); b = a.s; b.G = new I(0, 0.05); b.H = new I(0.55,
                0.95); t.v(a); return b}, NorGate:function(a, b, c){a = t.u(); var d = H.va, f = 0.5, g = d * f, h = 0, k = 0.5; J(a, 0.8 * b, 0.5 * c, !0); K(a, 0.7 * b, (k + g) * c, (h + g) * b, (k + f) * c, 0, 1 * c); K(a, 0.25 * b, 0.75 * c, 0.25 * b, 0.25 * c, 0, 0); K(a, (h + g) * b, (k - f) * c, 0.7 * b, (k - g) * c, 0.8 * b, 0.5 * c); f = 0.1; g = 0.1 * d; h = 0.9; k = 0.5; J(a, (h - f) * b, k * c, !0); K(a, (h - f) * b, (k - g) * c, (h - g) * b, (k - f) * c, h * b, (k - f) * c); K(a, (h + g) * b, (k - f) * c, (h + f) * b, (k - g) * c, (h + f) * b, k * c); K(a, (h + f) * b, (k + g) * c, (h + g) * b, (k + f) * c, h * b, (k + f) * c); K(a, (h - g) * b, (k + f) * c, (h - f) * b, (k + g) * c, (h - f) * b, k * c); b = a.s; b.G = new I(0.2, 0.25);
                b.H = new I(0.6, 0.75); t.v(a); return b}, OrGate:function(a, b, c){a = t.u(); var d = 0.5 * H.va; J(a, 0, 0, !0); K(a, (0 + d + d) * b, 0 * c, 0.8 * b, (0.5 - d) * c, 1 * b, 0.5 * c); K(a, 0.8 * b, (0.5 + d) * c, (0 + d + d) * b, 1 * c, 0, 1 * c); K(a, 0.25 * b, 0.75 * c, 0.25 * b, 0.25 * c, 0, 0); M(a); b = a.s; b.G = new I(0.2, 0.25); b.H = new I(0.75, 0.75); t.v(a); return b}, XnorGate:function(a, b, c){a = t.u(); var d = H.va, f = 0.5, g = d * f, h = 0.2, k = 0.5; J(a, 0.1 * b, 0, !1); K(a, 0.35 * b, 0.25 * c, 0.35 * b, 0.75 * c, 0.1 * b, 1 * c); J(a, 0.8 * b, 0.5 * c, !0); K(a, 0.7 * b, (k + g) * c, (h + g) * b, (k + f) * c, 0.2 * b, 1 * c); K(a, 0.45 * b, 0.75 * c, 0.45 *
                b, 0.25 * c, 0.2 * b, 0); K(a, (h + g) * b, (k - f) * c, 0.7 * b, (k - g) * c, 0.8 * b, 0.5 * c); f = 0.1; g = 0.1 * d; h = 0.9; k = 0.5; J(a, (h - f) * b, k * c, !0); K(a, (h - f) * b, (k - g) * c, (h - g) * b, (k - f) * c, h * b, (k - f) * c); K(a, (h + g) * b, (k - f) * c, (h + f) * b, (k - g) * c, (h + f) * b, k * c); K(a, (h + f) * b, (k + g) * c, (h + g) * b, (k + f) * c, h * b, (k + f) * c); K(a, (h - g) * b, (k + f) * c, (h - f) * b, (k + g) * c, (h - f) * b, k * c); b = a.s; b.G = new I(0.4, 0.25); b.H = new I(0.65, 0.75); t.v(a); return b}, XorGate:function(a, b, c){a = t.u(); var d = 0.5 * H.va; J(a, 0.1 * b, 0, !1); K(a, 0.35 * b, 0.25 * c, 0.35 * b, 0.75 * c, 0.1 * b, 1 * c); J(a, 0.2 * b, 0, !0); K(a, (0.2 +
                d) * b, 0 * c, 0.9 * b, (0.5 - d) * c, 1 * b, 0.5 * c); K(a, 0.9 * b, (0.5 + d) * c, (0.2 + d) * b, 1 * c, 0.2 * b, 1 * c); K(a, 0.45 * b, 0.75 * c, 0.45 * b, 0.25 * c, 0.2 * b, 0); M(a); b = a.s; b.G = new I(0.4, 0.25); b.H = new I(0.8, 0.75); t.v(a); return b}, Capacitor:function(a, b, c){a = t.u(); J(a, 0, 0, !1); a.lineTo(0, 1 * c); a.moveTo(1 * b, 0); a.lineTo(1 * b, 1 * c); b = a.s; t.v(a); return b}, Resistor:function(a, b, c){a = t.u(); J(a, 0, 0.5 * c, !1); a.lineTo(0.1 * b, 0); a.lineTo(0.2 * b, 1 * c); a.lineTo(0.3 * b, 0); a.lineTo(0.4 * b, 1 * c); a.lineTo(0.5 * b, 0); a.lineTo(0.6 * b, 1 * c); a.lineTo(0.7 * b, 0.5 * c); b = a.s; t.v(a);
                return b}, Inductor:function(a, b, c){a = t.u(); var d = 0.1 * H.va, f = 0.1, g = 0.5; J(a, (f - 0.5 * d) * b, (g + 0.1) * c, !1); K(a, (f - d) * b, (g + 0.1) * c, (f - 0.1) * b, (g + d) * c, (f + 0.1) * b, (g + d) * c); f = 0.3; g = 0.5; K(a, (f + 0.1) * b, (g + d) * c, (f + d) * b, (g + 0.1) * c, f * b, (g + 0.1) * c); K(a, (f - d) * b, (g + 0.1) * c, (f - 0.1) * b, (g + d) * c, (f + 0.1) * b, (g + d) * c); g = f = 0.5; K(a, (f + 0.1) * b, (g + d) * c, (f + d) * b, (g + 0.1) * c, f * b, (g + 0.1) * c); K(a, (f - d) * b, (g + 0.1) * c, (f - 0.1) * b, (g + d) * c, (f + 0.1) * b, (g + d) * c); f = 0.7; g = 0.5; K(a, (f + 0.1) * b, (g + d) * c, (f + d) * b, (g + 0.1) * c, f * b, (g + 0.1) * c); K(a, (f - d) * b, (g + 0.1) * c, (f - 0.1) *
                b, (g + d) * c, (f + 0.1) * b, (g + d) * c); f = 0.9; g = 0.5; K(a, (f + 0.1) * b, (g + d) * c, (f + d) * b, (g + 0.1) * c, (f + 0.5 * d) * b, (g + 0.1) * c); b = a.s; t.v(a); return b}, ACvoltageSource:function(a, b, c){a = t.u(); var d = 0.5 * H.va; J(a, 0 * b, 0.5 * c, !1); K(a, 0 * b, (0.5 - d) * c, (0.5 - d) * b, 0 * c, 0.5 * b, 0 * c); K(a, (0.5 + d) * b, 0 * c, 1 * b, (0.5 - d) * c, 1 * b, 0.5 * c); K(a, 1 * b, (0.5 + d) * c, (0.5 + d) * b, 1 * c, 0.5 * b, 1 * c); K(a, (0.5 - d) * b, 1 * c, 0 * b, (0.5 + d) * c, 0 * b, 0.5 * c); a.moveTo(0.1 * b, 0.5 * c); K(a, 0.5 * b, 0 * c, 0.5 * b, 1 * c, 0.9 * b, 0.5 * c); b = a.s; b.wc = Xg; t.v(a); return b}, DCvoltageSource:function(a, b, c){a = t.u();
                J(a, 0, 0.75 * c, !1); a.lineTo(0, 0.25 * c); a.moveTo(1 * b, 0); a.lineTo(1 * b, 1 * c); b = a.s; t.v(a); return b}, Diode:function(a, b, c){a = t.u(); J(a, 1 * b, 0, !1); a.lineTo(1 * b, 0.5 * c); a.lineTo(0, 1 * c); a.lineTo(0, 0); a.lineTo(1 * b, 0.5 * c); a.lineTo(1 * b, 1 * c); b = a.s; b.G = new I(0, 0.25); b.H = new I(0.5, 0.75); t.v(a); return b}, Wifi:function(a, b, c){var d = b, f = c; b *= 0.38; c *= 0.6; a = t.u(); var g = H.va, h = 0.8 * g, k = 0.8, l = 0, m = 0.5, d = (d - b) / 2, f = (f - c) / 2; J(a, l * b + d, (m + k) * c + f, !0); K(a, (l - h) * b + d, (m + k) * c + f, (l - k) * b + d, (m + h) * c + f, (l - k) * b + d, m * c + f); K(a, (l - k) * b + d, (m - h) *
                c + f, (l - h) * b + d, (m - k) * c + f, l * b + d, (m - k) * c + f); K(a, l * b + d, (m - k) * c + f, (l - k + 0.5 * h) * b + d, (m - h) * c + f, (l - k + 0.5 * h) * b + d, m * c + f); K(a, (l - k + 0.5 * h) * b + d, (m + h) * c + f, l * b + d, (m + k) * c + f, l * b + d, (m + k) * c + f); M(a); h = 0.4 * g; k = 0.4; l = 0.2; m = 0.5; J(a, l * b + d, (m + k) * c + f, !0); K(a, (l - h) * b + d, (m + k) * c + f, (l - k) * b + d, (m + h) * c + f, (l - k) * b + d, m * c + f); K(a, (l - k) * b + d, (m - h) * c + f, (l - h) * b + d, (m - k) * c + f, l * b + d, (m - k) * c + f); K(a, l * b + d, (m - k) * c + f, (l - k + 0.5 * h) * b + d, (m - h) * c + f, (l - k + 0.5 * h) * b + d, m * c + f); K(a, (l - k + 0.5 * h) * b + d, (m + h) * c + f, l * b + d, (m + k) * c + f, l * b + d, (m + k) * c + f); M(a); h = 0.2 * g; k = 0.2;
                m = l = 0.5; J(a, (l - k) * b + d, m * c + f, !0); K(a, (l - k) * b + d, (m - h) * c + f, (l - h) * b + d, (m - k) * c + f, l * b + d, (m - k) * c + f); K(a, (l + h) * b + d, (m - k) * c + f, (l + k) * b + d, (m - h) * c + f, (l + k) * b + d, m * c + f); K(a, (l + k) * b + d, (m + h) * c + f, (l + h) * b + d, (m + k) * c + f, l * b + d, (m + k) * c + f); K(a, (l - h) * b + d, (m + k) * c + f, (l - k) * b + d, (m + h) * c + f, (l - k) * b + d, m * c + f); h = 0.4 * g; k = 0.4; l = 0.8; m = 0.5; J(a, l * b + d, (m - k) * c + f, !0); K(a, (l + h) * b + d, (m - k) * c + f, (l + k) * b + d, (m - h) * c + f, (l + k) * b + d, m * c + f); K(a, (l + k) * b + d, (m + h) * c + f, (l + h) * b + d, (m + k) * c + f, l * b + d, (m + k) * c + f); K(a, l * b + d, (m + k) * c + f, (l + k - 0.5 * h) * b + d, (m + h) * c + f, (l + k - 0.5 *
                h) * b + d, m * c + f); K(a, (l + k - 0.5 * h) * b + d, (m - h) * c + f, l * b + d, (m - k) * c + f, l * b + d, (m - k) * c + f); M(a); h = 0.8 * g; k = 0.8; l = 1; m = 0.5; J(a, l * b + d, (m - k) * c + f, !0); K(a, (l + h) * b + d, (m - k) * c + f, (l + k) * b + d, (m - h) * c + f, (l + k) * b + d, m * c + f); K(a, (l + k) * b + d, (m + h) * c + f, (l + h) * b + d, (m + k) * c + f, l * b + d, (m + k) * c + f); K(a, l * b + d, (m + k) * c + f, (l + k - 0.5 * h) * b + d, (m + h) * c + f, (l + k - 0.5 * h) * b + d, m * c + f); K(a, (l + k - 0.5 * h) * b + d, (m - h) * c + f, l * b + d, (m - k) * c + f, l * b + d, (m - k) * c + f); M(a); b = a.s; t.v(a); return b}, Email:function(a, b, c){a = t.u(); J(a, 0, 0, !0); a.lineTo(1 * b, 0); a.lineTo(1 * b, 1 * c); a.lineTo(0, 1 *
                c); a.lineTo(0, 0); M(a); J(a, 0, 0, !1); a.lineTo(0.5 * b, 0.6 * c); a.lineTo(1 * b, 0); a.moveTo(0, 1 * c); a.lineTo(0.45 * b, 0.54 * c); a.moveTo(1 * b, 1 * c); a.lineTo(0.55 * b, 0.54 * c); a.bb(!1); b = a.s; t.v(a); return b}, Ethernet:function(a, b, c){a = t.u(); J(a, 0.35 * b, 0, !0); a.lineTo(0.65 * b, 0); a.lineTo(0.65 * b, 0.4 * c); a.lineTo(0.35 * b, 0.4 * c); a.lineTo(0.35 * b, 0); M(a); J(a, 0.1 * b, 1 * c, !0, !0); a.lineTo(0.4 * b, 1 * c); a.lineTo(0.4 * b, 0.6 * c); a.lineTo(0.1 * b, 0.6 * c); a.lineTo(0.1 * b, 1 * c); M(a); J(a, 0.6 * b, 1 * c, !0, !0); a.lineTo(0.9 * b, 1 * c); a.lineTo(0.9 * b, 0.6 * c); a.lineTo(0.6 *
                b, 0.6 * c); a.lineTo(0.6 * b, 1 * c); M(a); J(a, 0, 0.5 * c, !1); a.lineTo(1 * b, 0.5 * c); a.moveTo(0.5 * b, 0.5 * c); a.lineTo(0.5 * b, 0.4 * c); a.moveTo(0.75 * b, 0.5 * c); a.lineTo(0.75 * b, 0.6 * c); a.moveTo(0.25 * b, 0.5 * c); a.lineTo(0.25 * b, 0.6 * c); a.bb(!1); b = a.s; t.v(a); return b}, Power:function(a, b, c){a = t.u(); var d = H.va, f = 0.4 * d, g = 0.4, h = t.K(), k = t.K(), l = t.K(), m = t.K(); H.Ui(0.5, 0.5 - g, 0.5 + f, 0.5 - g, 0.5 + g, 0.5 - f, 0.5 + g, 0.5, 0.5, h, h, k, l, m); var n = t.lc(k.x, k.y); J(a, k.x * b, k.y * c, !0); K(a, l.x * b, l.y * c, m.x * b, m.y * c, (0.5 + g) * b, 0.5 * c); K(a, (0.5 + g) * b, (0.5 + f) * c, (0.5 +
                f) * b, (0.5 + g) * c, 0.5 * b, (0.5 + g) * c); K(a, (0.5 - f) * b, (0.5 + g) * c, (0.5 - g) * b, (0.5 + f) * c, (0.5 - g) * b, 0.5 * c); H.Ui(0.5 - g, 0.5, 0.5 - g, 0.5 - f, 0.5 - f, 0.5 - g, 0.5, 0.5 - g, 0.5, l, m, k, h, h); K(a, l.x * b, l.y * c, m.x * b, m.y * c, k.x * b, k.y * c); f = 0.3 * d; g = 0.3; H.Ui(0.5 - g, 0.5, 0.5 - g, 0.5 - f, 0.5 - f, 0.5 - g, 0.5, 0.5 - g, 0.5, l, m, k, h, h); a.lineTo(k.x * b, k.y * c); K(a, m.x * b, m.y * c, l.x * b, l.y * c, (0.5 - g) * b, 0.5 * c); K(a, (0.5 - g) * b, (0.5 + f) * c, (0.5 - f) * b, (0.5 + g) * c, 0.5 * b, (0.5 + g) * c); K(a, (0.5 + f) * b, (0.5 + g) * c, (0.5 + g) * b, (0.5 + f) * c, (0.5 + g) * b, 0.5 * c); H.Ui(0.5, 0.5 - g, 0.5 + f, 0.5 - g, 0.5 + g, 0.5 -
                f, 0.5 + g, 0.5, 0.5, h, h, k, l, m); K(a, m.x * b, m.y * c, l.x * b, l.y * c, k.x * b, k.y * c); M(a); J(a, 0.45 * b, 0, !0); a.lineTo(0.45 * b, 0.5 * c); a.lineTo(0.55 * b, 0.5 * c); a.lineTo(0.55 * b, 0); M(a); t.B(h); t.B(k); t.B(l); t.B(m); t.B(n); b = a.s; b.G = new I(0.25, 0.55); b.H = new I(0.75, 0.8); t.v(a); return b}, Fallout:function(a, b, c){a = t.u(); var d = 0.5 * H.va; J(a, 0 * b, 0.5 * c, !0); K(a, 0 * b, (0.5 - d) * c, (0.5 - d) * b, 0 * c, 0.5 * b, 0 * c); K(a, (0.5 + d) * b, 0 * c, 1 * b, (0.5 - d) * c, 1 * b, 0.5 * c); K(a, 1 * b, (0.5 + d) * c, (0.5 + d) * b, 1 * c, 0.5 * b, 1 * c); K(a, (0.5 - d) * b, 1 * c, 0 * b, (0.5 + d) * c, 0 * b, 0.5 * c); var f =
                d = 0; J(a, (0.3 + d) * b, (0.8 + f) * c, !0, !0); a.lineTo((0.5 + d) * b, (0.5 + f) * c); a.lineTo((0.1 + d) * b, (0.5 + f) * c); a.lineTo((0.3 + d) * b, (0.8 + f) * c); d = 0.4; f = 0; M(a); J(a, (0.3 + d) * b, (0.8 + f) * c, !0, !0); a.lineTo((0.5 + d) * b, (0.5 + f) * c); a.lineTo((0.1 + d) * b, (0.5 + f) * c); a.lineTo((0.3 + d) * b, (0.8 + f) * c); d = 0.2; f = - 0.3; M(a); J(a, (0.3 + d) * b, (0.8 + f) * c, !0, !0); a.lineTo((0.5 + d) * b, (0.5 + f) * c); a.lineTo((0.1 + d) * b, (0.5 + f) * c); a.lineTo((0.3 + d) * b, (0.8 + f) * c); M(a); b = a.s; b.wc = Xg; t.v(a); return b}, IrritationHazard:function(a, b, c){a = t.u(); J(a, 0.2 * b, 0 * c, !0); a.lineTo(0.5 *
                b, 0.3 * c); a.lineTo(0.8 * b, 0 * c); a.lineTo(1 * b, 0.2 * c); a.lineTo(0.7 * b, 0.5 * c); a.lineTo(1 * b, 0.8 * c); a.lineTo(0.8 * b, 1 * c); a.lineTo(0.5 * b, 0.7 * c); a.lineTo(0.2 * b, 1 * c); a.lineTo(0 * b, 0.8 * c); a.lineTo(0.3 * b, 0.5 * c); a.lineTo(0 * b, 0.2 * c); M(a); b = a.s; b.G = new I(0.3, 0.3); b.H = new I(0.7, 0.7); t.v(a); return b}, ElectricalHazard:function(a, b, c){a = t.u(); J(a, 0.37, 0 * c, !0); a.lineTo(0.5 * b, 0.11 * c); a.lineTo(0.77 * b, 0.04 * c); a.lineTo(0.33 * b, 0.49 * c); a.lineTo(1 * b, 0.37 * c); a.lineTo(0.63 * b, 0.86 * c); a.lineTo(0.77 * b, 0.91 * c); a.lineTo(0.34 * b, 1 * c); a.lineTo(0.34 *
                b, 0.78 * c); a.lineTo(0.44 * b, 0.8 * c); a.lineTo(0.65 * b, 0.56 * c); a.lineTo(0 * b, 0.68 * c); M(a); b = a.s; t.v(a); return b}, FireHazard:function(a, b, c){a = t.u(); J(a, 0.1 * b, 1 * c, !0); K(a, - 0.25 * b, 0.63 * c, 0.45 * b, 0.44 * c, 0.29 * b, 0 * c); K(a, 0.48 * b, 0.17 * c, 0.54 * b, 0.35 * c, 0.51 * b, 0.42 * c); K(a, 0.59 * b, 0.29 * c, 0.58 * b, 0.28 * c, 0.59 * b, 0.18 * c); K(a, 0.8 * b, 0.34 * c, 0.88 * b, 0.43 * c, 0.75 * b, 0.6 * c); K(a, 0.87 * b, 0.48 * c, 0.88 * b, 0.43 * c, 0.88 * b, 0.31 * c); K(a, 1.17 * b, 0.76 * c, 0.82 * b, 0.8 * c, 0.9 * b, 1 * c); M(a); b = a.s; b.G = new I(0.05, 0.645); b.H = new I(0.884, 0.908); t.v(a); return b},
                BpmnActivityLoop:function(a, b, c){a = t.u(); var d = 4 * (Math.SQRT2 - 1) / 3 * 0.5; J(a, (0.5 * Math.SQRT2 / 2 + 0.5) * b, (1 - (0.5 - 0.5 * Math.SQRT2 / 2)) * c, !1); K(a, 1 * b, 0.7 * c, 1 * b, 0.5 * c, 1 * b, 0.5 * c); K(a, 1 * b, (0.5 - d + 0) * c, (0.5 + d + 0) * b, 0 * c, 0.5 * b, 0 * c); K(a, (0.5 - d + 0) * b, 0 * c, 0 * b, (0.5 - d + 0) * c, 0 * b, 0.5 * c); K(a, 0 * b, (0.5 + d + 0) * c, (0.5 - d + 0) * b, 1 * c, 0.35 * b, 0.98 * c); a.moveTo(0.35 * b, 0.8 * c); a.lineTo(0.35 * b, 1 * c); a.lineTo(0.15 * b, 1 * c); b = a.s; t.v(a); return b}, BpmnActivityParallel:function(a, b, c){a = t.u(); J(a, 0, 0, !1); a.lineTo(0, 1 * c); a.moveTo(0.5 * b, 0); a.lineTo(0.5 *
                b, 1 * c); a.moveTo(1 * b, 0); a.lineTo(1 * b, 1 * c); b = a.s; t.v(a); return b}, BpmnActivitySequential:function(a, b, c){a = t.u(); J(a, 0, 0, !1); a.lineTo(1 * b, 0); a.moveTo(0, 0.5 * c); a.lineTo(1 * b, 0.5 * c); a.moveTo(0, 1 * c); a.lineTo(1 * b, 1 * c); b = a.s; t.v(a); return b}, BpmnActivityAdHoc:function(a, b, c){a = t.u(); J(a, 0, 0, !1); J(a, 1 * b, 1 * c, !1); J(a, 0, 0.5 * c, !1); K(a, 0.2 * b, 0.35 * c, 0.3 * b, 0.35 * c, 0.5 * b, 0.5 * c); K(a, 0.7 * b, 0.65 * c, 0.8 * b, 0.65 * c, 1 * b, 0.5 * c); b = a.s; t.v(a); return b}, BpmnActivityCompensation:function(a, b, c){a = t.u(); J(a, 0, 0.5 * c, !0); a.lineTo(0.5 *
                b, 0); a.lineTo(0.5 * b, 0.5 * c); a.lineTo(1 * b, 1 * c); a.lineTo(1 * b, 0); a.lineTo(0.5 * b, 0.5 * c); a.lineTo(0.5 * b, 1 * c); M(a); b = a.s; t.v(a); return b}, BpmnTaskMessage:function(a, b, c){a = t.u(); J(a, 0, 0.2 * c, !0); a.lineTo(1 * b, 0.2 * c); a.lineTo(1 * b, 0.8 * c); a.lineTo(0, 0.8 * c); a.lineTo(0, 0.8 * c); M(a); J(a, 0, 0.2 * c, !1); a.lineTo(0.5 * b, 0.5 * c); a.lineTo(1 * b, 0.2 * c); a.bb(!1); b = a.s; t.v(a); return b}, BpmnTaskScript:function(a, b, c){a = t.u(); J(a, 0.7 * b, 1 * c, !0); a.lineTo(0.3 * b, 1 * c); K(a, 0.6 * b, 0.5 * c, 0, 0.5 * c, 0.3 * b, 0); a.lineTo(0.7 * b, 0); K(a, 0.4 * b, 0.5 * c,
                1 * b, 0.5 * c, 0.7 * b, 1 * c); M(a); J(a, 0.45 * b, 0.73 * c, !1); a.lineTo(0.7 * b, 0.73 * c); a.moveTo(0.38 * b, 0.5 * c); a.lineTo(0.63 * b, 0.5 * c); a.moveTo(0.31 * b, 0.27 * c); a.lineTo(0.56 * b, 0.27 * c); a.bb(!1); b = a.s; t.v(a); return b}, BpmnTaskUser:function(a, b, c){a = t.u(); J(a, 0, 0, !1); J(a, 0.335 * b, (1 - 0.555) * c, !0); a.lineTo(0.335 * b, 0.595 * c); a.lineTo(0.665 * b, 0.595 * c); a.lineTo(0.665 * b, (1 - 0.555) * c); K(a, 0.88 * b, 0.46 * c, 0.98 * b, 0.54 * c, 1 * b, 0.68 * c); a.lineTo(1 * b, 1 * c); a.lineTo(0, 1 * c); a.lineTo(0, 0.68 * c); K(a, 0.02 * b, 0.54 * c, 0.12 * b, 0.46 * c, 0.335 * b, (1 - 0.555) *
                c); a.lineTo(0.365 * b, 0.405 * c); var d = 0.5 - 0.285, f = Math.PI / 4, g = 4 * (1 - Math.cos(f)) / (3 * Math.sin(f)), f = g * d, g = g * d; K(a, (0.5 - (f + d) / 2) * b, (d + (d + g) / 2) * c, (0.5 - d) * b, (d + g) * c, (0.5 - d) * b, d * c); K(a, (0.5 - d) * b, (d - g) * c, (0.5 - f) * b, (d - d) * c, 0.5 * b, (d - d) * c); K(a, (0.5 + f) * b, (d - d) * c, (0.5 + d) * b, (d - g) * c, (0.5 + d) * b, d * c); K(a, (0.5 + d) * b, (d + g) * c, (0.5 + (f + d) / 2) * b, (d + (d + g) / 2) * c, 0.635 * b, 0.405 * c); a.lineTo(0.635 * b, 0.405 * c); a.lineTo(0.665 * b, (1 - 0.555) * c); a.lineTo(0.665 * b, 0.595 * c); a.lineTo(0.335 * b, 0.595 * c); J(a, 0.2 * b, 1 * c, !1); a.lineTo(0.2 * b, 0.8 * c); J(a,
                0.8 * b, 1 * c, !1); a.lineTo(0.8 * b, 0.8 * c); b = a.s; t.v(a); return b}, BpmnEventConditional:function(a, b, c){a = t.u(); J(a, 0.1 * b, 0, !0); a.lineTo(0.9 * b, 0); a.lineTo(0.9 * b, 1 * c); a.lineTo(0.1 * b, 1 * c); M(a); J(a, 0.2 * b, 0.2 * c, !1); a.lineTo(0.8 * b, 0.2 * c); a.moveTo(0.2 * b, 0.4 * c); a.lineTo(0.8 * b, 0.4 * c); a.moveTo(0.2 * b, 0.6 * c); a.lineTo(0.8 * b, 0.6 * c); a.moveTo(0.2 * b, 0.8 * c); a.lineTo(0.8 * b, 0.8 * c); a.bb(!1); b = a.s; t.v(a); return b}, BpmnEventError:function(a, b, c){a = t.u(); J(a, 0, 1 * c, !0); a.lineTo(0.33 * b, 0); a.lineTo(0.66 * b, 0.5 * c); a.lineTo(1 * b, 0); a.lineTo(0.66 *
                b, 1 * c); a.lineTo(0.33 * b, 0.5 * c); M(a); b = a.s; t.v(a); return b}, BpmnEventEscalation:function(a, b, c){a = t.u(); J(a, 0, 0, !1); J(a, 1 * b, 1 * c, !1); J(a, 0.1 * b, 1 * c, !0); a.lineTo(0.5 * b, 0); a.lineTo(0.9 * b, 1 * c); a.lineTo(0.5 * b, 0.5 * c); M(a); b = a.s; t.v(a); return b}, BpmnEventTimer:function(a, b, c){a = t.u(); var d = 0.5 * H.va; J(a, 1 * b, 0.5 * c, !0); K(a, 1 * b, (0.5 + d) * c, (0.5 + d) * b, 1 * c, 0.5 * b, 1 * c); K(a, (0.5 - d) * b, 1 * c, 0, (0.5 + d) * c, 0, 0.5 * c); K(a, 0, (0.5 - d) * c, (0.5 - d) * b, 0, 0.5 * b, 0); K(a, (0.5 + d) * b, 0, 1 * b, (0.5 - d) * c, 1 * b, 0.5 * c); J(a, 0.5 * b, 0, !1); a.lineTo(0.5 * b, 0.15 *
                c); a.moveTo(0.5 * b, 1 * c); a.lineTo(0.5 * b, 0.85 * c); a.moveTo(0, 0.5 * c); a.lineTo(0.15 * b, 0.5 * c); a.moveTo(1 * b, 0.5 * c); a.lineTo(0.85 * b, 0.5 * c); a.moveTo(0.5 * b, 0.5 * c); a.lineTo(0.58 * b, 0.1 * c); a.moveTo(0.5 * b, 0.5 * c); a.lineTo(0.78 * b, 0.54 * c); a.bb(!1); b = a.s; b.wc = Xg; t.v(a); return b}}; H.NA = {}; for (var rm in H.aj)H.aj[rm.toLowerCase()] = rm;
        H.bw = {"":"", Standard:"F1 m 0,0 l 8,4 -8,4 2,-4 z", Backward:"F1 m 8,0 l -2,4 2,4 -8,-4 z", Triangle:"F1 m 0,0 l 8,4.62 -8,4.62 z", BackwardTriangle:"F1 m 8,4 l 0,4 -8,-4 8,-4 0,4 z", Boomerang:"F1 m 0,0 l 8,4 -8,4 4,-4 -4,-4 z", BackwardBoomerang:"F1 m 8,0 l -8,4 8,4 -4,-4 4,-4 z", SidewaysV:"m 0,0 l 8,4 -8,4 0,-1 6,-3 -6,-3 0,-1 z", BackwardV:"m 8,0 l -8,4 8,4 0,-1 -6,-3 6,-3 0,-1 z", OpenTriangle:"m 0,0 l 8,4 -8,4", BackwardOpenTriangle:"m 8,0 l -8,4 8,4", OpenTriangleLine:"m 0,0 l 8,4 -8,4 m 8.5,0 l 0,-8",
                BackwardOpenTriangleLine:"m 8,0 l  -8,4 8,4 m -8.5,0 l 0,-8", OpenTriangleTop:"m 0,0 l 8,4 m 0,4", BackwardOpenTriangleTop:"m 8,0 l -8,4 m 0,4", OpenTriangleBottom:"m 0,8 l 8,-4", BackwardOpenTriangleBottom:"m 0,4 l 8,4", HalfTriangleTop:"F1 m 0,0 l 0,4 8,0 z m 0,8", BackwardHalfTriangleTop:"F1 m 8,0 l 0,4 -8,0 z m 0,8", HalfTriangleBottom:"F1 m 0,4 l 0,4 8,-4 z", BackwardHalfTriangleBottom:"F1 m 8,4 l 0,4 -8,-4 z", ForwardSemiCircle:"m 4,0 b 270 180 0 4 4", BackwardSemiCircle:"m 4,8 b 90 180 0 -4 4", Feather:"m 0,0 l 3,4 -3,4",
                BackwardFeather:"m 3,0 l -3,4 3,4", DoubleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4", BackwardDoubleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4", TripleFeathers:"m 0,0 l 3,4 -3,4 m 3,-8 l 3,4 -3,4 m 3,-8 l 3,4 -3,4", BackwardTripleFeathers:"m 3,0 l -3,4 3,4 m 3,-8 l -3,4 3,4 m 3,-8 l -3,4 3,4", ForwardSlash:"m 0,8 l 5,-8", BackSlash:"m 0,0 l 5,8", DoubleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8", DoubleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8", TripleForwardSlash:"m 0,8 l 4,-8 m -2,8 l 4,-8 m -2,8 l 4,-8",
                TripleBackSlash:"m 0,0 l 4,8 m -2,-8 l 4,8 m -2,-8 l 4,8", Fork:"m 0,4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4", BackwardFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4", LineFork:"m 0,0 l 0,8 m 0,-4 l 8,0 m -8,0 l 8,-4 m -8,4 l 8,4", BackwardLineFork:"m 8,4 l -8,0 m 8,0 l -8,-4 m 8,4 l -8,4 m 8,-8 l 0,8", CircleFork:"F1 m 6,4 b 0 360 -3 0 3 z m 0,0 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4", BackwardCircleFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 6,0 b 0 360 -3 0 3", CircleLineFork:"F1 m 6,4 b 0 360 -3 0 3 z m 1,-4 l 0,8 m 0,-4 l 6,0 m -6,0 l 6,-4 m -6,4 l 6,4",
                BackwardCircleLineFork:"F1 m 0,4 l 6,0 m -6,-4 l 6,4 m -6,4 l 6,-4 m 0,-4 l 0,8 m 7,-4 b 0 360 -3 0 3", Circle:"F1 m 8,4 b 0 360 -4 0 4 z", Block:"F1 m 0,0 l 0,8 8,0 0,-8 z", StretchedDiamond:"F1 m 0,3 l 5,-3 5,3 -5,3 -5,-3 z", Diamond:"F1 m 0,4 l 4,-4 4,4 -4,4 -4,-4 z", Chevron:"F1 m 0,0 l 5,0 3,4 -3,4 -5,0 3,-4 -3,-4 z", StretchedChevron:"F1 m 0,0 l 8,0 3,4 -3,4 -8,0 3,-4 -3,-4 z", NormalArrow:"F1 m 0,2 l 4,0 0,-2 4,4 -4,4 0,-2 -4,0 z", X:"m 0,0 l 8,8 m 0,-8 l -8,8", TailedNormalArrow:"F1 m 0,0 l 2,0 1,2 3,0 0,-2 2,4 -2,4 0,-2 -3,0 -1,2 -2,0 1,-4 -1,-4 z",
                DoubleTriangle:"F1 m 0,0 l 4,4 -4,4 0,-8 z  m 4,0 l 4,4 -4,4 0,-8 z", BigEndArrow:"F1 m 0,0 l 5,2 0,-2 3,4 -3,4 0,-2 -5,2 0,-8 z", ConcaveTailArrow:"F1 m 0,2 h 4 v -2 l 4,4 -4,4 v -2 h -4 l 2,-2 -2,-2 z", RoundedTriangle:"F1 m 0,1 a 1,1 0 0 1 1,-1 l 7,3 a 0.5,1 0 0 1 0,2 l -7,3 a 1,1 0 0 1 -1,-1 l 0,-6 z", SimpleArrow:"F1 m 1,2 l -1,-2 2,0 1,2 -1,2 -2,0 1,-2 5,0 0,-2 2,2 -2,2 0,-2 z", AccelerationArrow:"F1 m 0,0 l 0,8 0.2,0 0,-8 -0.2,0 z m 2,0 l 0,8 1,0 0,-8 -1,0 z m 3,0 l 2,0 2,4 -2,4 -2,0 0,-8 z", BoxArrow:"F1 m 0,0 l 4,0 0,2 2,0 0,-2 2,4 -2,4 0,-2 -2,0 0,2 -4,0 0,-8 z",
                TriangleLine:"F1 m 8,4 l -8,-4 0,8 8,-4 z m 0.5,4 l 0,-8", CircleEndedArrow:"F1 m 10,4 l -2,-3 0,2 -2,0 0,2 2,0 0,2 2,-3 z m -4,0 b 0 360 -3 0 3 z", DynamicWidthArrow:"F1 m 0,3 l 2,0 2,-1 2,-2 2,4 -2,4 -2,-2 -2,-1 -2,0 0,-2 z", EquilibriumArrow:"m 0,3 l 8,0 -3,-3 m 3,5 l -8,0 3,3", FastForward:"F1 m 0,0 l 3.5,4 0,-4 3.5,4 0,-4 1,0 0,8 -1,0 0,-4 -3.5,4 0,-4 -3.5,4 0,-8 z", Kite:"F1 m 0,4 l 2,-4 6,4 -6,4 -2,-4 z", HalfArrowTop:"F1 m 0,0 l 4,4 4,0 -8,-4 z m 0,8", HalfArrowBottom:"F1 m 0,8 l 4,-4 4,0 -8,4 z",
                OpposingDirectionDoubleArrow:"F1 m 0,4 l 2,-4 0,2 4,0 0,-2 2,4 -2,4 0,-2 -4,0 0,2 -2,-4 z", PartialDoubleTriangle:"F1 m 0,0 4,3 0,-3 4,4 -4,4 0,-3 -4,3 0,-8 z", LineCircle:"F1 m 0,0 l 0,8 m 7 -4 b 0 360 -3 0 3 z", DoubleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z", TripleLineCircle:"F1 m 0,0 l 0,8 m 2,-8 l 0,8 m 2,-8 l 0,8 m 7 -4 b 0 360 -3 0 3 z", CircleLine:"F1 m 6 4 b 0 360 -3 0 3 z m 1,-4 l 0,8", DiamondCircle:"F1 m 8,4 l -4,4 -4,-4 4,-4 4,4 m 8,0 b 0 360 -4 0 4 z", PlusCircle:"F1 m 8,4 b 0 360 -4 0 4 l -8 0 z m -4 -4 l 0 8",
                OpenRightTriangleTop:"m 8,0 l 0,4 -8,0 m 0,4", OpenRightTriangleBottom:"m 8,8 l 0,-4 -8,0", Line:"m 0,0 l 0,8", DoubleLine:"m 0,0 l 0,8 m 2,0 l 0,-8", TripleLine:"m 0,0 l 0,8 m 2,0 l 0,-8 m 2,0 l 0,8", PentagonArrow:"F1 m 8,4 l -4,-4 -4,0 0,8 4,0 4,-4 z"}; H.Am = {}; H.NJ = function(){if (H.bw){for (var a in H.bw){var b = Rc(H.bw[a], !1); H.Am[a] = b; a.toLowerCase() !== a && (H.Am[a.toLowerCase()] = a)}H.bw = void 0}};
        H.RD = function(a){H.NJ(); var b = H.Am[a]; if (void 0 === b){b = a.toLowerCase(); if ("none" === b)return"None"; b = H.Am[b]}return"string" === typeof b?b:b instanceof zc?a:null}; W.FigureGenerators = H.aj; W.ArrowheadGeometries = H.Am;
        function E(a){0 === arguments.length?y.call(this):y.call(this, a); this.W = 311807; this.Jk = this.rh = ""; this.Yr = this.Vr = this.hs = this.ir = null; this.js = ""; this.ki = this.is = this.qm = null; this.Xr = ""; this.wo = null; this.Wr = (new ga(NaN, NaN)).freeze(); this.Zr = ""; this.xo = null; this.je = ""; this.mo = this.wq = this.yk = null; this.Wg = (new w(NaN, NaN)).freeze(); this.pr = ""; this.Mk = null; this.qr = Eb; this.zr = H.aH; this.sr = H.$G; this.Gq = null; this.jr = sm; this.tm = (new w(6, 6)).freeze(); this.sm = "gray"; this.rm = 4; this.BC = - 1; this.kH = new x; this.Gj =
                null; this.Dj = NaN}t.ga("Part", E); t.Ka(E, y); E.prototype.cloneProtected = function(a){y.prototype.cloneProtected.call(this, a); a.W = this.W & - 4097 | 49152; a.rh = this.rh; a.Jk = this.Jk; a.ir = this.ir; a.hs = this.hs; a.Vr = this.Vr; a.Yr = this.Yr; a.js = this.js; a.is = this.is; a.ki = null; a.Xr = this.Xr; a.Wr.assign(this.Wr); a.Zr = this.Zr; a.je = this.je; a.wq = this.wq; a.Wg.assign(this.Wg); a.pr = this.pr; a.qr = this.qr.Z(); a.zr = this.zr.Z(); a.sr = this.sr.Z(); a.Gq = this.Gq; a.jr = this.jr; a.tm.assign(this.tm); a.sm = this.sm; a.rm = this.rm};
        E.prototype.Yh = function(a){y.prototype.Yh.call(this, a); qk(a); a.qm = null; a.wo = null; a.xo = null; a.Mk = null; a.Gj = null}; E.prototype.toString = function(){var a = t.ug(Object.getPrototypeOf(this)) + "#" + t.od(this); this.data && (a += "(" + yd(this.data) + ")"); return a}; E.LayoutNone = 0; var $i; E.LayoutAdded = $i = 1; var fj; E.LayoutRemoved = fj = 2; E.LayoutShown = 4; E.LayoutHidden = 8; E.LayoutNodeSized = 16; var Kj; E.LayoutGroupLayout = Kj = 32; E.LayoutNodeReplaced = 64; var sm; E.LayoutStandard = sm = $i | fj | 28 | Kj | 64;
        E.prototype.fn = function(a, b, c, d, f, g, h){var k = this.h; null !== k && (a === wd && "elements" === b?f instanceof y && aj(f, function(a){bj(k, a)}):a === xd && "elements" === b && f instanceof y && aj(f, function(a){ej(k, a)}), k.Zc(a, b, c, d, f, g, h))}; E.prototype.updateTargetBindings = E.prototype.Qb = function(a){y.prototype.Qb.call(this, a); if (null !== this.data){a = this.xa.n; for (var b = a.length, c = 0; c < b; c++){var d = a[c]; d instanceof y && aj(d, function(a){null !== a.data && a.Qb()})}}};
        E.prototype.updateModelDataReferences = function(){var a = this.data; if (null !== a && !(this instanceof Ke)){var b = this.h; if (null !== b){var c = b.ba; if (c instanceof P){var d = c.Rm(a), b = b.DI(d), f = this.gb; b !== f && (b = null !== f?c.Hb(f.data):void 0, f = c.dn, "function" === typeof f?f(a, b):a[f] = b, c.sx(a, d))}}}}; t.A(E, {Yv:"adornments"}, function(){return null === this.ki?t.Yf:this.ki.iF}); E.prototype.findAdornment = E.prototype.ap = function(a){e && t.i(a, "string", E, "findAdornment:category"); var b = this.ki; return null === b?null:b.za(a)};
        E.prototype.addAdornment = E.prototype.Vk = function(a, b){if (null !== b){e && (t.i(a, "string", E, "addAdornment:category"), t.l(b, Ke, E, "addAdornment:ad")); var c = null, d = this.ki; null !== d && (c = d.za(a)); if (c !== b){if (null !== c){var f = c.h; null !== f && f.remove(c)}null === d && (this.ki = d = new ja("string", Ke)); b.rh !== a && (b.Wc = a); d.add(a, b); c = this.h; null !== c && (c.add(b), b.data = this.data)}}};
        E.prototype.removeAdornment = E.prototype.ul = function(a){e && t.i(a, "string", E, "removeAdornment:category"); var b = this.ki; if (null !== b){var c = b.za(a); if (null !== c){var d = c.h; null !== d && d.remove(c)}b.remove(a); 0 === b.count && (this.ki = null)}}; E.prototype.clearAdornments = E.prototype.Mf = function(){var a = this.ki; if (null !== a){for (var b = t.Cb(), a = a.k; a.next(); )b.push(a.key); for (var a = b.length, c = 0; c < a; c++)this.ul(b[c]); t.ya(b)}};
        E.prototype.updateAdornments = function(){var a = this.h; if (null !== a){tm(this, a); for (var a = a.wb.df.n, b = a.length, c = 0; c < b; c++){var d = a[c]; d.isEnabled && d.updateAdornments(this)}for (a = this.Yv; a.next(); )a.value.fa()}};
        function tm(a, b){if (a.eb && a.eG){var c = a.Mt; if (null === c || !(a.pa.N() && a.Sa() && c.ol() && c.pa.N()))return; var d = a.ap("Selection"); if (null === d){d = a.fG; null === d && (a instanceof V?d = b.qF:a instanceof E && (d = a instanceof T?b.ME:b.FF)); if (!(d instanceof Ke))return; Me(d); d = d.copy(); if (!(d instanceof Ke))return; d.Wc = "Selection"; d.pc = c}if (null !== d){var f = d.placeholder; if (null !== f){var g = c.dk(), h = 0; c instanceof W && (h = c.fb); var k = t.Al(); k.p((c.Qa.width + h) * g, (c.Qa.height + h) * g); f.Ca = k; t.bk(k)}d.angle = c.gl(); d.type !==
                wg?(f = t.K(), d.location = c.qb(Eb, f), t.B(f)):d.fa(); a.Vk("Selection", d); return}}a.ul("Selection")}t.A(E, {layer:"layer"}, function(){return this.mo}); t.A(E, {h:"diagram"}, function(){var a = this.mo; return null !== a?a.h:null}); t.g(E, "layerName", E.prototype.af);
        t.defineProperty(E, {af:"layerName"}, function(){return this.Jk}, function(a){var b = this.Jk; if (b !== a){t.i(a, "string", E, "layerName"); var c = this.h; if (null === c || null !== c.bt(a) && !c.un)if (this.Jk = a, this.j("layerName", b, a), b = this.layer, null !== b && b.name !== a && (c = b.h, null !== c && (a = c.bt(a), null !== a && a !== b))){var d = b.Xe( - 1, this, !0); 0 <= d && c.Zc(xd, "parts", b, this, null, d, !0); d = a.mp(99999999, this, !0); 0 <= d && c.Zc(wd, "parts", a, null, this, !0, d); d = this.sp; if (null !== d){var f = c.Na; c.Na = !0; d(this, b, a); c.Na = f}}}});
        t.g(E, "layerChanged", E.prototype.sp); t.defineProperty(E, {sp:"layerChanged"}, function(){return this.ir}, function(a){var b = this.ir; b !== a && (null !== a && t.i(a, "function", E, "layerChanged"), this.ir = a, this.j("layerChanged", b, a))}); t.A(E, {yc:"isTemporary"}, function(){return null !== this.mo?this.mo.yc:!1}); function um(a){var b = a.h; null !== b && (yi(b), 0 !== (a.W & 16384) !== !0 && (a.W |= 16384, b.Zd()))}function Rh(a){0 !== (a.W & 16384) !== !1 && (a.updateAdornments(), a.W &= - 16385, a = a.h, null !== a && (a.ve = !0))}t.g(E, "location", E.prototype.location);
        t.defineProperty(E, {location:"location"}, function(){return this.Wg}, function(a){var b = this.Wg; if (!(b.M(a) || this instanceof V)){e && t.l(a, w, E, "location"); a = a.Z(); var c = this.h; this.Wg = a; if (!1 === Qi(this)){var d = this.Ma, f = a.x - b.x, g = a.y - b.y, h = d.copy(); d.p(h.x + f, h.y + g); Lk(this, !0); !d.M(h) && c && this.j("position", h, d)}this.j("location", b, a)}}); function Lk(a, b){if (!1 === Ri(a)){var c = a.h; null !== c && (a.Sa() && c.cg.add(a), a instanceof S && !c.ja.sb && a.vf(), b || c.Zd()); vm(a, !0)}}
function wm(a){if (!1 !== Ri(a)){var b = a.position, c = a.location; c.N() && b.N() || (xm(a, b, c), mk(a)); var b = a.Ma, c = a.cc, d = c.copy(); c.La(); c.x = b.x; c.y = b.y; c.freeze(); nk(a, d, c); vm(a, !1)}}t.A(E, {kc:"locationObject"}, function(){if (null === this.Mk){var a = this.Xw; void 0 !== a && null !== a && "" !== a?(a = this.me(a), this.Mk = null !== a?a:this):this.Mk = this instanceof Ke && this.da !== wg && null !== this.Jb?this.Jb:this}return this.Mk.visible?this.Mk:this}); t.g(E, "minLocation", E.prototype.yF);
        t.defineProperty(E, {yF:"minLocation"}, function(){return this.zr}, function(a){var b = this.zr; b.M(a) || (e && t.l(a, w, E, "minLocation"), this.zr = a = a.Z(), this.j("minLocation", b, a))}); t.g(E, "maxLocation", E.prototype.sF); t.defineProperty(E, {sF:"maxLocation"}, function(){return this.sr}, function(a){var b = this.sr; b.M(a) || (e && t.l(a, w, E, "maxLocation"), this.sr = a = a.Z(), this.j("maxLocation", b, a))}); t.g(E, "locationObjectName", E.prototype.Xw);
        t.defineProperty(E, {Xw:"locationObjectName"}, function(){return this.pr}, function(a){var b = this.pr; b !== a && (e && t.i(a, "string", E, "locationObjectName"), this.pr = a, this.Mk = null, Dk(this), this.j("locationObjectName", b, a))}); t.g(E, "locationSpot", E.prototype.bf);
        t.defineProperty(E, {bf:"locationSpot"}, function(){return this.qr}, function(a){var b = this.qr; b.M(a) || (e && (t.l(a, I, E, "locationSpot"), a.vd() || t.m("Part.locationSpot must be a specific Spot value, not: " + a)), this.qr = a = a.Z(), Dk(this), this.j("locationSpot", b, a))}); E.prototype.move = E.prototype.move = function(a){this.position = a}; E.prototype.moveTo = E.prototype.moveTo = function(a, b){var c = t.lc(a, b); this.move(c); t.B(c)};
        E.prototype.isVisible = E.prototype.Sa = function(){if (!this.visible)return!1; var a = this.layer; if (null !== a && !a.visible)return!1; a = this.gb; if (!(null === a || a.qe && a.Sa()))return!1; if (this instanceof S){a = this.dA(); if (null !== a && !a.Oc)return!1; a = this.Xd; if (null !== a)return a.Sa()} else if (this instanceof V){var b = !0, c = this.h; null !== c && (b = c.pd); c = this.aa; if (null !== c){if (this.Ec && b && !c.Oc)return!1; c = c.findVisibleNode(); if (null === c || c === a)return!1}c = this.ca; if (null !== c){if (this.Ec && !b && !c.Oc)return!1; b = c.findVisibleNode();
                if (null === b || b === a)return!1}}return!0}; E.prototype.gh = function(a){a?(this.J(4), um(this), this.ka(), a = this.h, null !== a && a.cg.add(this)):(this.J(8), this.Mf())};
        E.prototype.findObject = E.prototype.me = function(a){if (this.name === a)return this; null === this.Gj && (this.Gj = {}); var b = this.Gj; if (void 0 !== b[a])return b[a]; for (var c = this.xa.n, d = c.length, f = 0; f < d; f++){var g = c[f]; if (g.name === a)return b[a] = g; if (g instanceof y)if (null === g.yi && null === g.eg){if (g = g.me(a), null !== g)return b[a] = g} else if (Ul(g) && (g = g.xa.$a(), null !== g && g.name === a))return b[a] = g}return b[a] = null};
        function ym(a, b, c, d){void 0 === d && (d = new w); c.Ge() && (c = Kb); var f = b.Qa; d.p(f.width * c.x + c.offsetX, f.height * c.y + c.offsetY); if (null === b || b === a)return d; b.transform.Ta(d); for (b = b.ia; null !== b && b !== a; )b.transform.Ta(d), b = b.ia; a.Lk.Ta(d); d.offset( - a.Tc.x, - a.Tc.y); return d}E.prototype.ensureBounds = E.prototype.rf = function(){ih(this, Infinity, Infinity); this.Jc()};
        function Uh(a, b, c){c = void 0 === c?a.kH:c; var d; isNaN(a.Dj) && (a.Dj = Vl(a)); d = a.Dj; var f = 2 * d; if (!a.fj)return c.p(b.x - 1 - d, b.y - 1 - d, b.width + 2 + f, b.height + 2 + f), c; d = b.x; var f = b.y, g = b.width; b = b.height; var h = a.shadowBlur; a = a.mG; g += h; b += h; d -= h / 2; f -= h / 2; 0 < a.x?g += a.x:(d += a.x, g -= a.x); 0 < a.y?b += a.y:(f += a.y, b -= a.y); c.p(d - 1, f - 1, g + 2, b + 2); return c}aa = E.prototype;
        aa.Jc = function(){mk(this); if (!1 === Qi(this))wm(this); else{var a = t.Df(); a.assign(this.cc); Ak(this); this.cc.La(); var b = Qh(this); this.Uj(0, 0, this.Tc.width, this.Tc.height); var c = this.position; xm(this, c, this.location); var d = this.cc; d.x = c.x; d.y = c.y; d.freeze(); mk(this); nk(this, a, d); a.M(d)?this.Vf(b):!this.Jd() || H.I(a.width, d.width) && H.I(a.height, d.height) || 0 <= this.BC && this.J(16); t.hc(a); vm(this, !1)}};
        aa.kG = function(a, b){if (!a.N() || this instanceof V)return!1; if (this.h && !(this instanceof Ke)){var c = this.h.li; c.sd && Gh(c, this, b.copy(), a.copy())}var c = this.Wg, d = c.copy(); !1 === Qi(this)?(c.p(c.x + (a.x - this.Ma.x), c.y + (a.y - this.Ma.y)), this.Ma = a, Lk(this, !0), mk(this), wm(this), c.M(d) || this.j("location", d, c)):(this.Ma = a, c.p(NaN, NaN)); return!0}; aa.lG = function(a, b){var c = this.Wg; !1 === Qi(this)?(this.Wg.p(c.x + a - this.Ma.x, c.y + b - this.Ma.y), this.Ma.p(a, b), Lk(this, !1), mk(this)):(c.p(NaN, NaN), this.Ma.p(a, b))};
        function xm(a, b, c){var d = NaN, f = NaN, g = t.K(), h = a.bf, k = a.kc; h.Ge() && t.m("determineOffset: Part's locationSpot must be real: " + h.toString()); var l = k.Qa, d = 0; k.fb && (d = k.$g); g.Ot(0, 0, l.width + d, l.height + d, h); if (k !== a)for (k.fb && g.offset( - d / 2, - d / 2), k.transform.Ta(g), h = k.ia; null !== h && h !== a; )h.transform.Ta(g), h = h.ia; a.Lk.Ta(g); g.offset( - a.Tc.x, - a.Tc.y); h = a.h; c.N()?(k = b.x, l = b.y, d = c.x - g.x, f = c.y - g.y, b.p(d, f), c = !1, null !== h && (d = h.li, d.wj?c = !0:!d.sd || a instanceof Ke || Gh(d, a, new w(k, l), b), c || b.x === k && b.y === l || (d = h.Wa,
                h.Wa = !0, a.j("position", new w(k, l), b), h.Wa = d))):b.N() && (d = b.x, f = b.y, b = c.copy(), c.p(d + g.x, f + g.y), c.M(b) || null === h || (d = h.Wa, h.Wa = !0, a.j("location", b, c), h.Wa = d)); t.B(g)}function cj(a, b, c){sk(a, !1); a instanceof S && Sj(c, a); a.layer.yc || b || c.Mc(); b = a.cc; var d = c.xb; d.N()?(Qh(a)?eb(b, d) || (a.Vf(!1), um(a)):b.Qf(d) && a.Vf(!0), a.updateAdornments()):c.Hk = !0}aa.nl = function(){return!0};
        function Sh(a, b){if (a.visible){var c = a.cc; if (0 !== c.width && 0 !== c.height && !isNaN(c.x) && !isNaN(c.y)){var d = a.transform, f = a.ia, g = a.jk; g.reset(); null !== f && (f.Ef()?g.multiply(f.ke):null !== f.ia && g.multiply(f.ia.ke)); g.multiply(a.ld); null !== a.uc && (xk(a, b, a.uc, !0, !0), b.fillRect(c.x, c.y, c.width, c.height)); null === a.uc && null === a.Lb && (b.fillStyle = "rgba(0,0,0,0.4)", b.fillRect(c.x, c.y, c.width, c.height)); null !== a.Lb && (d.pt() || b.transform(d.m11, d.m12, d.m21, d.m22, d.dx, d.dy), f = a.Qa, c = f.width, f = f.height, xk(a, b, a.Lb,
                !0), b.fillRect(0, 0, c + 0, f + 0), d.pt() || (c = 1 / (d.m11 * d.m22 - d.m12 * d.m21), b.transform(d.m22 * c, - d.m12 * c, - d.m21 * c, d.m11 * c, c * (d.m21 * d.dy - d.m22 * d.dx), c * (d.m12 * d.dx - d.m11 * d.dy))))}}}aa.Jd = function(){return!0}; t.g(E, "category", E.prototype.Wc);
        t.defineProperty(E, {Wc:"category"}, function(){return this.rh}, function(a){var b = this.rh; if (b !== a){t.i(a, "string", E, "category"); this.rh = a; this.j("category", b, a); var c = this.h, d = this.data; if (null !== c && null !== d){var f = c.ba; this instanceof V?(f instanceof P?f.iG(d, a):f instanceof Ld && f.LJ(d, a), c = c.findTemplateForLinkData(d, a), c instanceof V && (Me(c), c = c.copy(), c instanceof V && zm(this, c, b, a))):this instanceof Ke || (null !== f && f.ox(d, a), c = c.findTemplateForNodeData(d, a), c instanceof E && (Me(c), c = c.copy(), c instanceof
                E && !(c instanceof V) && (c.location = this.location, zm(this, c, b, a))))}this instanceof Ke && (a = this.Wh, null !== a && (c = a.ki, null !== c && c.remove(b), a.Vk(this.rh, this)))}});
        function zm(a, b, c, d){b.constructor === a.constructor || t.OG || (t.OG = !0, t.trace('Should not change the class of the Part when changing category from "' + c + '" to "' + d + '"'), t.trace("  Old class: " + t.ug(a) + ", new class: " + t.ug(b) + ", part: " + a.toString())); a.Mf(); var f = a.data; c = a.af; var g = a.eb, h = a.wg, k = !0, l = !0, m = !1; a instanceof S && (k = a.di, l = a.Oc, m = a.pn); b.Yh(a); b.cloneProtected(a); a.rh = d; a.fa(); a.ka(); b = a.h; d = !0; null !== b && (d = b.Wa, b.Wa = !0); a.Ml = f; null !== f && a.Qb(); null !== b && (b.Wa = d); f = a.af; f !== c && (a.Jk = c, a.af =
                f); a instanceof S && (a.di = k, a.Oc = l, a.pn = m, a.Jd() && a.J(64)); a.eb = g; a.wg = h}E.prototype.canCopy = function(){if (!this.fE)return!1; var a = this.layer; if (null === a)return!0; if (!a.Ri)return!1; a = a.h; return null === a?!0:a.Ri?!0:!1}; E.prototype.canDelete = function(){if (!this.oE)return!1; var a = this.layer; if (null === a)return!0; if (!a.Yk)return!1; a = a.h; return null === a?!0:a.Yk?!0:!1};
        E.prototype.canEdit = function(){if (!this.wG)return!1; var a = this.layer; if (null === a)return!0; if (!a.Qo)return!1; a = a.h; return null === a?!0:a.Qo?!0:!1}; E.prototype.canGroup = function(){if (!this.NE)return!1; var a = this.layer; if (null === a)return!0; if (!a.Mo)return!1; a = a.h; return null === a?!0:a.Mo?!0:!1}; E.prototype.canMove = function(){if (!this.BF)return!1; var a = this.layer; if (null === a)return!0; if (!a.Sj)return!1; a = a.h; return null === a?!0:a.Sj?!0:!1};
        E.prototype.canReshape = function(){if (!this.PF)return!1; var a = this.layer; if (null === a)return!0; if (!a.No)return!1; a = a.h; return null === a?!0:a.No?!0:!1}; E.prototype.canResize = function(){if (!this.QF)return!1; var a = this.layer; if (null === a)return!0; if (!a.Oo)return!1; a = a.h; return null === a?!0:a.Oo?!0:!1}; E.prototype.canRotate = function(){if (!this.WF)return!1; var a = this.layer; if (null === a)return!0; if (!a.Po)return!1; a = a.h; return null === a?!0:a.Po?!0:!1};
        E.prototype.canSelect = function(){if (!this.vl)return!1; var a = this.layer; if (null === a)return!0; if (!a.Pe)return!1; a = a.h; return null === a?!0:a.Pe?!0:!1}; t.g(E, "copyable", E.prototype.fE); t.defineProperty(E, {fE:"copyable"}, function(){return 0 !== (this.W & 1)}, function(a){var b = 0 !== (this.W & 1); b !== a && (e && t.i(a, "boolean", E, "copyable"), this.W ^= 1, this.j("copyable", b, a))}); t.g(E, "deletable", E.prototype.oE);
        t.defineProperty(E, {oE:"deletable"}, function(){return 0 !== (this.W & 2)}, function(a){var b = 0 !== (this.W & 2); b !== a && (e && t.i(a, "boolean", E, "deletable"), this.W ^= 2, this.j("deletable", b, a))}); t.g(E, "textEditable", E.prototype.wG); t.defineProperty(E, {wG:"textEditable"}, function(){return 0 !== (this.W & 4)}, function(a){var b = 0 !== (this.W & 4); b !== a && (e && t.i(a, "boolean", E, "textEditable"), this.W ^= 4, this.j("textEditable", b, a), this.updateAdornments())}); t.g(E, "groupable", E.prototype.NE);
        t.defineProperty(E, {NE:"groupable"}, function(){return 0 !== (this.W & 8)}, function(a){var b = 0 !== (this.W & 8); b !== a && (e && t.i(a, "boolean", E, "groupable"), this.W ^= 8, this.j("groupable", b, a))}); t.g(E, "movable", E.prototype.BF); t.defineProperty(E, {BF:"movable"}, function(){return 0 !== (this.W & 16)}, function(a){var b = 0 !== (this.W & 16); b !== a && (e && t.i(a, "boolean", E, "movable"), this.W ^= 16, this.j("movable", b, a))}); t.g(E, "selectionAdorned", E.prototype.eG);
        t.defineProperty(E, {eG:"selectionAdorned"}, function(){return 0 !== (this.W & 32)}, function(a){var b = 0 !== (this.W & 32); b !== a && (e && t.i(a, "boolean", E, "selectionAdorned"), this.W ^= 32, this.j("selectionAdorned", b, a), this.updateAdornments())}); t.g(E, "isInDocumentBounds", E.prototype.uA); t.defineProperty(E, {uA:"isInDocumentBounds"}, function(){return 0 !== (this.W & 64)}, function(a){var b = 0 !== (this.W & 64); b !== a && (e && t.i(a, "boolean", E, "isInDocumentBounds"), this.W ^= 64, this.j("isInDocumentBounds", b, a))});
        t.g(E, "isLayoutPositioned", E.prototype.wA); t.defineProperty(E, {wA:"isLayoutPositioned"}, function(){return 0 !== (this.W & 128)}, function(a){var b = 0 !== (this.W & 128); b !== a && (e && t.i(a, "boolean", E, "isLayoutPositioned"), this.W ^= 128, this.j("isLayoutPositioned", b, a), this.J(a?4:8))}); t.g(E, "selectable", E.prototype.vl); t.defineProperty(E, {vl:"selectable"}, function(){return 0 !== (this.W & 256)}, function(a){var b = 0 !== (this.W & 256); b !== a && (e && t.i(a, "boolean", E, "selectable"), this.W ^= 256, this.j("selectable", b, a), this.updateAdornments())});
        t.g(E, "reshapable", E.prototype.PF); t.defineProperty(E, {PF:"reshapable"}, function(){return 0 !== (this.W & 512)}, function(a){var b = 0 !== (this.W & 512); b !== a && (e && t.i(a, "boolean", E, "reshapable"), this.W ^= 512, this.j("reshapable", b, a), this.updateAdornments())}); t.g(E, "resizable", E.prototype.QF); t.defineProperty(E, {QF:"resizable"}, function(){return 0 !== (this.W & 1024)}, function(a){var b = 0 !== (this.W & 1024); b !== a && (e && t.i(a, "boolean", E, "resizable"), this.W ^= 1024, this.j("resizable", b, a), this.updateAdornments())});
        t.g(E, "rotatable", E.prototype.WF); t.defineProperty(E, {WF:"rotatable"}, function(){return 0 !== (this.W & 2048)}, function(a){var b = 0 !== (this.W & 2048); b !== a && (e && t.i(a, "boolean", E, "rotatable"), this.W ^= 2048, this.j("rotatable", b, a), this.updateAdornments())}); t.g(E, "isSelected", E.prototype.eb);
        t.defineProperty(E, {eb:"isSelected"}, function(){return 0 !== (this.W & 4096)}, function(a){var b = 0 !== (this.W & 4096); if (b !== a){e && t.i(a, "boolean", E, "isSelected"); var c = this.h; if (!a || this.canSelect() && !(null !== c && c.selection.count >= c.tF)){this.W ^= 4096; var d = !1; if (null !== c){d = c.Wa; c.Wa = !0; var f = c.selection; f.La(); a?f.add(this):f.remove(this); f.freeze()}this.j("isSelected", b, a); um(this); a = this.gG; null !== a && a(this); null !== c && (c.Zd(), c.Wa = d)}}}); t.g(E, "isHighlighted", E.prototype.wg);
        t.defineProperty(E, {wg:"isHighlighted"}, function(){return 0 !== (this.W & 524288)}, function(a){var b = 0 !== (this.W & 524288); if (b !== a){e && t.i(a, "boolean", E, "isHighlighted"); this.W ^= 524288; var c = this.h; null !== c && (c = c.Hw, c.La(), a?c.add(this):c.remove(this), c.freeze()); this.j("isHighlighted", b, a); this.ka()}}); t.g(E, "isShadowed", E.prototype.fj);
        t.defineProperty(E, {fj:"isShadowed"}, function(){return 0 !== (this.W & 8192)}, function(a){var b = 0 !== (this.W & 8192); b !== a && (e && t.i(a, "boolean", E, "isShadowed"), this.W ^= 8192, this.j("isShadowed", b, a), this.ka())}); function Ri(a){return 0 !== (a.W & 32768)}function vm(a, b){a.W = b?a.W | 32768:a.W & - 32769}function sk(a, b){a.W = b?a.W | 65536:a.W & - 65537}function Qh(a){return 0 !== (a.W & 131072)}E.prototype.Vf = function(a){this.W = a?this.W | 131072:this.W & - 131073}; t.g(E, "isAnimated", E.prototype.oA);
        t.defineProperty(E, {oA:"isAnimated"}, function(){return 0 !== (this.W & 262144)}, function(a){var b = 0 !== (this.W & 262144); b !== a && (e && t.i(a, "boolean", E, "isAnimated"), this.W ^= 262144, this.j("isAnimated", b, a))}); t.g(E, "selectionObjectName", E.prototype.nx); t.defineProperty(E, {nx:"selectionObjectName"}, function(){return this.js}, function(a){var b = this.js; b !== a && (e && t.i(a, "string", E, "selectionObjectName"), this.js = a, this.qm = null, this.j("selectionObjectName", b, a))}); t.g(E, "selectionAdornmentTemplate", E.prototype.fG);
        t.defineProperty(E, {fG:"selectionAdornmentTemplate"}, function(){return this.hs}, function(a){var b = this.hs; b !== a && (e && t.l(a, Ke, E, "selectionAdornmentTemplate"), this instanceof V && (a.type = wg), this.hs = a, this.j("selectionAdornmentTemplate", b, a))}); t.A(E, {Mt:"selectionObject"}, function(){if (null === this.qm){var a = this.nx; null !== a && "" !== a?(a = this.me(a), this.qm = null !== a?a:this):this instanceof V?(a = this.path, this.qm = null !== a?a:this):this.qm = this}return this.qm}); t.g(E, "selectionChanged", E.prototype.gG);
        t.defineProperty(E, {gG:"selectionChanged"}, function(){return this.is}, function(a){var b = this.is; b !== a && (null !== a && t.i(a, "function", E, "selectionChanged"), this.is = a, this.j("selectionChanged", b, a))}); t.g(E, "resizeAdornmentTemplate", E.prototype.RF); t.defineProperty(E, {RF:"resizeAdornmentTemplate"}, function(){return this.Vr}, function(a){var b = this.Vr; b !== a && (e && t.l(a, Ke, E, "resizeAdornmentTemplate"), this.Vr = a, this.j("resizeAdornmentTemplate", b, a))}); t.g(E, "resizeObjectName", E.prototype.UF);
        t.defineProperty(E, {UF:"resizeObjectName"}, function(){return this.Xr}, function(a){var b = this.Xr; b !== a && (e && t.i(a, "string", E, "resizeObjectName"), this.Xr = a, this.wo = null, this.j("resizeObjectName", b, a))}); t.A(E, {TF:"resizeObject"}, function(){if (null === this.wo){var a = this.UF; null !== a && "" !== a?(a = this.me(a), this.wo = null !== a?a:this):this.wo = this}return this.wo}); t.g(E, "resizeCellSize", E.prototype.SF);
        t.defineProperty(E, {SF:"resizeCellSize"}, function(){return this.Wr}, function(a){var b = this.Wr; b.M(a) || (e && t.l(a, ga, E, "resizeCellSize"), this.Wr = a = a.Z(), this.j("resizeCellSize", b, a))}); t.g(E, "rotateAdornmentTemplate", E.prototype.XF); t.defineProperty(E, {XF:"rotateAdornmentTemplate"}, function(){return this.Yr}, function(a){var b = this.Yr; b !== a && (e && t.l(a, Ke, E, "rotateAdornmentTemplate"), this.Yr = a, this.j("rotateAdornmentTemplate", b, a))}); t.g(E, "rotateObjectName", E.prototype.ZF);
        t.defineProperty(E, {ZF:"rotateObjectName"}, function(){return this.Zr}, function(a){var b = this.Zr; b !== a && (e && t.i(a, "string", E, "rotateObjectName"), this.Zr = a, this.xo = null, this.j("rotateObjectName", b, a))}); t.A(E, {YF:"rotateObject"}, function(){if (null === this.xo){var a = this.ZF; null !== a && "" !== a?(a = this.me(a), this.xo = null !== a?a:this):this.xo = this}return this.xo}); t.g(E, "text", E.prototype.text);
        t.defineProperty(E, {text:"text"}, function(){return this.je}, function(a){var b = this.je; b !== a && (e && t.i(a, "string", E, "text"), this.je = a, this.j("text", b, a))}); t.g(E, "containingGroup", E.prototype.gb);
        t.defineProperty(E, {gb:"containingGroup"}, function(){return this.yk}, function(a){if (this.Jd()){var b = this.yk; if (b !== a){e && null !== a && t.l(a, T, E, "containingGroup"); null === a || this !== a && !a.ml(this) || (this === a && t.m("Cannot make a Group a member of itself: " + this.toString()), t.m("Cannot make a Group indirectly contain itself: " + this.toString() + " already contains " + a.toString())); this.J(fj); var c = this.h; null !== b?Am(b, this):this instanceof T && null !== c && c.Tk.remove(this); this.yk = a; null !== a?Bm(a, this):this instanceof
                T && null !== c && c.Tk.add(this); this.J($i); if (null !== c){var d = this.data, f = c.ba; null !== d && f instanceof P && f.sx(d, f.Hb(null !== a?a.data:null))}d = this.Wz; null !== d && (f = !0, null !== c && (f = c.Na, c.Na = !0), d(this, b, a), null !== c && (c.Na = f)); if (this instanceof T)for (c = new C(E), Je(c, this, !0, 0), c = c.k; c.next(); )if (d = c.value, d instanceof S)for (d = d.re; d.next(); )f = d.value, Gj(f); if (this instanceof S)for (d = this.re; d.next(); )f = d.value, Gj(f); this.j("containingGroup", b, a); null !== a && a.ux()}} else t.m("cannot set the Part.containingGroup of a Link or Adornment")});
        function qk(a){a = a.gb; null !== a && (a.fa(), null !== a.Jb && a.Jb.fa(), a.vf())}E.prototype.kt = function(a){var b = this.yk; null === b || a || Bm(b, this)}; E.prototype.lt = function(a){var b = this.yk; null === b || a || Am(b, this)}; E.prototype.Mm = function(){var a = this.data; if (null !== a){var b = this.h; null !== b && (b = b.ba, null !== b && b.jx(a))}}; t.g(E, "containingGroupChanged", E.prototype.Wz);
        t.defineProperty(E, {Wz:"containingGroupChanged"}, function(){return this.wq}, function(a){var b = this.wq; b !== a && (null !== a && t.i(a, "function", E, "containingGroupChanged"), this.wq = a, this.j("containingGroupChanged", b, a))}); E.prototype.findTopLevelPart = function(){return Cm(this, this)}; function Cm(a, b){var c = b.gb; return null !== c?Cm(a, c):b instanceof S && (c = b.Xd, null !== c)?Cm(a, c):b}t.A(E, {rp:"isTopLevel"}, function(){return null !== this.gb || this instanceof S && this.bi?!1:!0});
        E.prototype.isMemberOf = E.prototype.ml = function(a){return a instanceof T?Dm(this, this, a):!1}; function Dm(a, b, c){if (b === c || null === c)return!1; var d = b.gb; return null === d || d !== c && !Dm(a, d, c)?b instanceof S && (b = b.Xd, null !== b)?Dm(a, b, c):!1:!0}E.prototype.findCommonContainingGroup = E.prototype.CI = function(a){return Em(this, this, a)};
        function Em(a, b, c){if (null === b || null === c)return null; var d = b.gb; if (null === d)return null; if (b === c)return d; var f = c.gb; return null === f?null:d === f?f:Dm(a, c, d)?d:Dm(a, b, f)?f:Em(a, d, f)}t.g(E, "layoutConditions", E.prototype.lF); t.defineProperty(E, {lF:"layoutConditions"}, function(){return this.jr}, function(a){var b = this.jr; b !== a && (e && t.i(a, "number", E, "layoutConditions"), this.jr = a, this.j("layoutConditions", b, a))});
        E.prototype.canLayout = function(){if (!this.wA || !this.Sa())return!1; var a = this.layer; return null !== a && a.yc || this instanceof S && this.bi?!1:!0}; E.prototype.invalidateLayout = E.prototype.J = function(a){void 0 === a && (a = 16777215); var b; this.wA && 0 !== (a & this.lF)?(b = this.layer, null !== b && b.yc || this instanceof S && this.bi?b = !1:(b = this.h, b = null !== b && b.ja.sb?!1:!0)):b = !1; if (b)if (b = this.yk, null !== b){var c = b.jc; null !== c?c.J():b.J(a)} else a = this.h, null !== a && (c = a.jc, null !== c && c.J())};
        function dj(a){if (!a.Sa())return!1; a = a.layer; return null !== a && a.yc?!1:!0}t.g(E, "dragComputation", E.prototype.aA); t.defineProperty(E, {aA:"dragComputation"}, function(){return this.Gq}, function(a){var b = this.Gq; b !== a && (null !== a && t.i(a, "function", E, "dragComputation"), this.Gq = a, this.j("dragComputation", b, a))}); t.g(E, "shadowOffset", E.prototype.mG);
        t.defineProperty(E, {mG:"shadowOffset"}, function(){return this.tm}, function(a){var b = this.tm; b.M(a) || (e && t.l(a, w, E, "shadowOffset"), this.tm = a = a.Z(), this.ka(), this.j("shadowOffset", b, a))}); t.g(E, "shadowColor", E.prototype.shadowColor); t.defineProperty(E, {shadowColor:"shadowColor"}, function(){return this.sm}, function(a){var b = this.sm; b !== a && (e && t.i(a, "string", E, "shadowColor"), this.sm = a, this.ka(), this.j("shadowColor", b, a))}); t.g(E, "shadowBlur", E.prototype.shadowBlur);
        t.defineProperty(E, {shadowBlur:"shadowBlur"}, function(){return this.rm}, function(a){var b = this.rm; b !== a && (e && t.i(a, "number", E, "shadowBlur"), this.rm = a, this.ka(), this.j("shadowBlur", b, a))}); function Ke(a){0 === arguments.length?E.call(this, $g):E.call(this, a); this.af = "Adornment"; this.ib = null; this.W &= - 257; this.Wg = new w(NaN, NaN); this.mi = new B(x); this.Jb = null}t.ga("Adornment", Ke); t.Ka(Ke, E); aa = Ke.prototype; aa.toString = function(){var a = this.Wh; return"Adornment(" + this.Wc + ")" + (null !== a?a.toString():"")};
        aa.uj = function(){return this.ib && this.ib.S instanceof V?this.ib.S.uj():null}; aa.Qq = function(){return null}; aa.Yw = function(){var a = this.pc.S, b = this.pc; if (a instanceof V && b instanceof W){var c = a.path, b = c.Oa; a.Yw(); for (var b = c.Oa, a = this.xa, c = a.length, d = 0; d < c; d++){var f = a.n[d]; f.ej && f instanceof W && (f.Oa = b)}}}; aa.Py = function(){var a = this.Wh; return a instanceof V?a.Cc:null}; t.A(Ke, {placeholder:"placeholder"}, function(){return this.Jb}); t.g(Ke, "adornedObject", Ke.prototype.pc);
        t.defineProperty(Ke, {pc:"adornedObject"}, function(){return this.ib}, function(a){e && null !== a && t.l(a, Q, E, "adornedObject:val"); var b = this.Wh, c = null; null !== a && (c = a.S); null === b || null !== a && b === c || b.ul(this.Wc); this.ib = a; c && c.Vk(this.Wc, this)}); t.A(Ke, {Wh:"adornedPart"}, function(){var a = this.ib; return null !== a?a.S:null}); Ke.prototype.nl = function(){var a = this.ib; if (null === a)return!0; a = a.S; return null === a || !Qi(a)}; Ke.prototype.Jd = function(){return!1}; t.A(Ke, {gb:"containingGroup"}, function(){return null});
        Ke.prototype.fn = function(a, b, c, d, f, g, h){if (a === wd && "elements" === b)if (f instanceof Ug)null === this.Jb?this.Jb = f:this.Jb !== f && t.m("Cannot insert a second Placeholder into the visual tree of an Adornment."); else{if (f instanceof y){var k = f.at(function(a){return a instanceof Ug}); k instanceof Ug && (null === this.Jb?this.Jb = k:this.Jb !== k && t.m("Cannot insert a second Placeholder into the visual tree of an Adornment."))}} else a === xd && "elements" === b && null !== this.Jb && (d === this.Jb?this.Jb = null:d instanceof y && this.Jb.dj(d) &&
                (this.Jb = null)); E.prototype.fn.call(this, a, b, c, d, f, g, h)}; Ke.prototype.updateAdornments = function(){}; Ke.prototype.Mm = function(){}; function S(a){0 === arguments.length?E.call(this, $g):E.call(this, a); this.mc = new B(V); this.jo = this.Kk = this.mr = this.lr = null; this.cr = !0; this.Gs = !1; this.Bs = null; this.pq = this.dr = !0; this.qq = H.cH; this.Pd = this.qh = null; this.Pr = Fm; this.Uh = !1}t.ga("Node", S); t.Ka(S, E);
        S.prototype.cloneProtected = function(a){E.prototype.cloneProtected.call(this, a); a.lr = this.lr; a.mr = this.mr; a.Kk = this.Kk; a.cr = this.cr; a.Gs = this.Gs; a.Bs = this.Bs; a.dr = this.dr; a.pq = this.pq; a.qq = this.qq.Z(); a.Pr = this.Pr}; S.prototype.Yh = function(a){E.prototype.Yh.call(this, a); a.vf(); a.qh = this.qh; a.Pd = null}; var Gm; S.DirectionDefault = Gm = t.w(S, "DirectionDefault", 0); S.DirectionAbsolute = t.w(S, "DirectionAbsolute", 1); var Hm; S.DirectionRotatedNode = Hm = t.w(S, "DirectionRotatedNode", 2); var ek;
        S.DirectionRotatedNodeOrthogonal = ek = t.w(S, "DirectionRotatedNodeOrthogonal", 3); S.SpreadingNone = t.w(S, "SpreadingNone", 10); var Fm; S.SpreadingEvenly = Fm = t.w(S, "SpreadingEvenly", 11); var Im; S.SpreadingPacked = Im = t.w(S, "SpreadingPacked", 12); function Jm(a, b){null !== b && (null === a.qh && (a.qh = new C(Km)), a.qh.add(b))}
S.prototype.fn = function(a, b, c, d, f, g, h){a === wd && "elements" === b?this.Pd = null:a === xd && "elements" === b && (null === this.h?this.Pd = null:d instanceof Q && Ql(this, d, function(a, b){Mk(a, b, !0)})); E.prototype.fn.call(this, a, b, c, d, f, g, h)}; S.prototype.invalidateConnectedLinks = S.prototype.vf = function(a){void 0 === a && (a = null); for (var b = this.re; b.next(); ){var c = b.value; null !== a && a.contains(c) || (Lm(this, c.ud), Lm(this, c.de), c.ac())}}; function Lm(a, b){if (null !== b){b.Nr = null; var c = a.gb; null === c || c.qe || Lm(c, c.fl(""))}}
S.prototype.nl = function(){return!0}; t.defineProperty(S, {AJ:"portSpreading"}, function(){return this.Pr}, function(a){var b = this.Pr; b !== a && (e && t.Aa(a, S, S, "portSpreading"), this.Pr = a, this.j("portSpreading", b, a), a = this.h, null !== a && a.ja.sb || this.vf())}); t.g(S, "avoidable", S.prototype.Qz); t.defineProperty(S, {Qz:"avoidable"}, function(){return this.pq}, function(a){var b = this.pq; if (b !== a){e && t.i(a, "boolean", S, "avoidable"); this.pq = a; var c = this.h; null !== c && Sj(c, this); this.j("avoidable", b, a)}});
        t.g(S, "avoidableMargin", S.prototype.PD); t.defineProperty(S, {PD:"avoidableMargin"}, function(){return this.qq}, function(a){"number" === typeof a?a = new ab(a):t.l(a, ab, S, "avoidableMargin"); var b = this.qq; if (!b.M(a)){this.qq = a = a.Z(); var c = this.h; null !== c && Sj(c, this); this.j("avoidableMargin", b, a)}}); S.prototype.canAvoid = function(){return this.Qz && !this.bi}; S.prototype.getAvoidableRect = function(a){a.set(this.pa); a.Xv(this.PD); return a};
        S.prototype.findVisibleNode = function(){for (var a = this; null !== a && !a.Sa(); )a = a.gb; return a}; S.prototype.gh = function(a){E.prototype.gh.call(this, a); for (var b = this.re; b.next(); )b.value.gh(a)}; t.A(S, {re:"linksConnected"}, function(){return this.mc.k}); S.prototype.findLinksConnected = S.prototype.yE = function(a){void 0 === a && (a = null); if (null === a)return this.mc.k; e && t.i(a, "string", S, "findLinksConnected:pid"); var b = new Ba(this.mc), c = this; b.sl = function(b){return b.aa === c && b.Of === a || b.ca === c && b.Mg === a}; return b};
        S.prototype.findLinksOutOf = S.prototype.yw = function(a){void 0 === a && (a = null); e && null !== a && t.i(a, "string", S, "findLinksOutOf:pid"); var b = new Ba(this.mc), c = this; b.sl = function(b){return b.aa !== c?!1:null === a?!0:b.Of === a}; return b}; S.prototype.findLinksInto = S.prototype.tg = function(a){void 0 === a && (a = null); e && null !== a && t.i(a, "string", S, "findLinksInto:pid"); var b = new Ba(this.mc), c = this; b.sl = function(b){return b.ca !== c?!1:null === a?!0:b.Mg === a}; return b};
        S.prototype.findNodesConnected = S.prototype.zE = function(a){void 0 === a && (a = null); e && null !== a && t.i(a, "string", S, "findNodesConnected:pid"); for (var b = null, c = null, d = this.mc.k; d.next(); ){var f = d.value; if (f.aa === this){if (null === a || f.Of === a)f = f.ca, null !== b?b.add(f):null !== c && c !== f?(b = new C(S), b.add(c), b.add(f)):c = f} else f.ca !== this || null !== a && f.Mg !== a || (f = f.aa, null !== b?b.add(f):null !== c && c !== f?(b = new C(S), b.add(c), b.add(f)):c = f)}return null !== b?b.k:null !== c?new Aa(c):t.Yf};
        S.prototype.findNodesOutOf = function(a){void 0 === a && (a = null); e && null !== a && t.i(a, "string", S, "findNodesOutOf:pid"); for (var b = null, c = null, d = this.mc.k; d.next(); ){var f = d.value; f.aa !== this || null !== a && f.Of !== a || (f = f.ca, null !== b?b.add(f):null !== c && c !== f?(b = new C(S), b.add(c), b.add(f)):c = f)}return null !== b?b.k:null !== c?new Aa(c):t.Yf};
        S.prototype.findNodesInto = function(a){void 0 === a && (a = null); e && null !== a && t.i(a, "string", S, "findNodesInto:pid"); for (var b = null, c = null, d = this.mc.k; d.next(); ){var f = d.value; f.ca !== this || null !== a && f.Mg !== a || (f = f.aa, null !== b?b.add(f):null !== c && c !== f?(b = new C(S), b.add(c), b.add(f)):c = f)}return null !== b?b.k:null !== c?new Aa(c):t.Yf};
        S.prototype.findLinksBetween = function(a, b, c){void 0 === b && (b = null); void 0 === c && (c = null); e && (t.l(a, S, S, "findLinksBetween:othernode"), null !== b && t.i(b, "string", S, "findLinksBetween:pid"), null !== c && t.i(c, "string", S, "findLinksBetween:otherpid")); var d = new Ba(this.mc), f = this; d.sl = function(d){return(d.aa !== f || d.ca !== a || null !== b && d.Of !== b || null !== c && d.Mg !== c) && (d.aa !== a || d.ca !== f || null !== c && d.Of !== c || null !== b && d.Mg !== b)?!1:!0}; return d};
        S.prototype.findLinksTo = function(a, b, c){void 0 === b && (b = null); void 0 === c && (c = null); e && (t.l(a, S, S, "findLinksTo:othernode"), null !== b && t.i(b, "string", S, "findLinksTo:pid"), null !== c && t.i(c, "string", S, "findLinksTo:otherpid")); var d = new Ba(this.mc), f = this; d.sl = function(d){return d.aa !== f || d.ca !== a || null !== b && d.Of !== b || null !== c && d.Mg === c?!1:!0}; return d}; t.g(S, "linkConnected", S.prototype.nF);
        t.defineProperty(S, {nF:"linkConnected"}, function(){return this.lr}, function(a){var b = this.lr; b !== a && (null !== a && t.i(a, "function", S, "linkConnected"), this.lr = a, this.j("linkConnected", b, a))}); t.g(S, "linkDisconnected", S.prototype.oF); t.defineProperty(S, {oF:"linkDisconnected"}, function(){return this.mr}, function(a){var b = this.mr; b !== a && (null !== a && t.i(a, "function", S, "linkDisconnected"), this.mr = a, this.j("linkDisconnected", b, a))}); t.g(S, "linkValidation", S.prototype.zp);
        t.defineProperty(S, {zp:"linkValidation"}, function(){return this.Kk}, function(a){var b = this.Kk; b !== a && (null !== a && t.i(a, "function", S, "linkValidation"), this.Kk = a, this.j("linkValidation", b, a))});
        function Mm(a, b, c){Lm(a, c); if (!a.mc.contains(b)){a.mc.add(b); var d = a.nF; if (null !== d){var f = !0, g = a.h; null !== g && (f = g.Na, g.Na = !0); d(a, b, c); null !== g && (g.Na = f)}b.Ec && (c = b.aa, b = b.ca, null !== c && null !== b && c !== b && (d = !0, g = a.h, null !== g && (d = g.pd), a = d?b:c, f = d?c:b, a.Uh || (a.Uh = f), !f.di || null !== g && g.ja.sb || (d?c === f && (f.di = !1):b === f && (f.di = !1))))}}
function Nm(a, b, c){Lm(a, c); if (a.mc.remove(b)){var d = a.oF, f = a.h; if (null !== d){var g = !0; null !== f && (g = f.Na, f.Na = !0); d(a, b, c); null !== f && (f.Na = g)}b.Ec && (c = !0, null !== f && (c = f.pd), a = c?b.ca:b.aa, b = c?b.aa:b.ca, null !== a && (a.Uh = !1), null === b || b.di || (0 === b.mc.count?(b.Uh = null, null !== f && f.ja.sb || (b.di = !0)):Lj(b)))}}
function Lj(a){a.Uh = !1; if (0 !== a.mc.count){var b = !0, c = a.h; if (null === c || !c.ja.sb){null !== c && (b = c.pd); for (c = a.mc.k; c.next(); ){var d = c.value; if (d.Ec)if (b){if (d.aa === a){a.di = !1; return}} else if (d.ca === a){a.di = !1; return}}a.di = !0}}}
S.prototype.updateModelDataReferences = function(){E.prototype.updateModelDataReferences.call(this); var a = this.data; if (null !== a){var b = this.h; if (null !== b){var c = b.ba; if (c instanceof Ld){var d = c.Sm(a), b = b.Ve(d), f = this.dA(); b !== f && (b = null !== f?c.Hb(f.data):void 0, f = c.en, "function" === typeof f?f(a, b):a[f] = b, c.lh(a, d))}}}}; S.prototype.kt = function(a){E.prototype.kt.call(this, a); a || Lj(this); var b = this.jo; null === b || a || Om(b, this)};
        S.prototype.lt = function(a){E.prototype.lt.call(this, a); var b = this.jo; null === b || a || null === b.we || (b.we.remove(this), b.fa())}; S.prototype.Mm = function(){if (0 < this.mc.count){var a = this.h; if (null === a)return; for (var b = this.mc.copy().k; b.next(); )a.remove(b.value)}this.Xd = null; E.prototype.Mm.call(this)}; t.A(S, {bi:"isLinkLabel"}, function(){return null !== this.jo}); t.g(S, "labeledLink", S.prototype.Xd);
        t.defineProperty(S, {Xd:"labeledLink"}, function(){return this.jo}, function(a){var b = this.jo; if (b !== a){e && null !== a && t.l(a, V, S, "labeledLink"); var c = this.h, d = this.data; if (null !== b && (null !== b.we && (b.we.remove(this), b.fa()), null !== c && null !== d && !c.ja.sb)){var f = b.data, g = c.ba; if (null !== f && g instanceof P){var h = g.Hb(d); void 0 !== h && g.FJ(f, h)}}this.jo = a; null !== a && (Om(a, this), null === c || null === d || c.ja.sb || (f = a.data, g = c.ba, null !== f && g instanceof P && (h = g.Hb(d), void 0 !== h && g.GD(f, h)))); Dk(this); this.j("labeledLink",
                b, a)}}); S.prototype.findPort = S.prototype.fl = function(a){e && t.i(a, "string", S, "findPort:pid"); if (null === this.Pd){if ("" === a && !1 === this.Eh)return this; Nk(this)}var b = this.Pd.za(a); return null !== b || "" !== a && (b = this.Pd.za(""), null !== b)?b:this}; t.A(S, {port:"port"}, function(){return this.fl("")}); t.A(S, {ports:"ports"}, function(){null === this.Pd && Nk(this); return this.Pd.iF});
        function Nk(a){null === a.Pd?a.Pd = new ja("string", Q):a.Pd.clear(); Ql(a, a, function(a, c){var d = c.Ld; null !== d && a.Pd.add(d, c)}); 0 === a.Pd.count && a.Pd.add("", a)}function Mk(a, b, c){var d = b.Ld; if (null !== d && (null !== a.Pd && a.Pd.remove(d), b = a.h, null !== b && c)){c = null; for (a = a.yE(d); a.next(); )null === c && (c = t.Cb()), c.push(a.value); if (null !== c){for (a = 0; a < c.length; a++)b.remove(c[a]); t.ya(c)}}}
S.prototype.isInTreeOf = function(a){if (null === a || a === this)return!1; var b = !0, c = this.h; null !== c && (b = c.pd); c = this; if (b)for (; c !== a; ){for (var b = null, d = c.mc.k; d.next(); ){var f = d.value; if (f.Ec && (b = f.aa, b !== c && b !== this))break}if (b === this || null === b || b === c)return!1; c = b} else for (; c !== a; ){b = null; for (d = c.mc.k; d.next() && (f = d.value, !f.Ec || (b = f.ca, b === c || b === this)); ); if (b === this || null === b || b === c)return!1; c = b}return!0};
        S.prototype.findTreeRoot = function(){var a = !0, b = this.h; null !== b && (a = b.pd); b = this; if (a)for (; ; ){for (var a = null, c = b.mc.k; c.next(); ){var d = c.value; if (d.Ec && (a = d.aa, a !== b && a !== this))break}if (a === this)return this; if (null === a || a === b)return b; b = a} else for (; ; ){a = null; for (c = b.mc.k; c.next() && (d = c.value, !d.Ec || (a = d.ca, a === b || a === this)); ); if (a === this)return this; if (null === a || a === b)return b; b = a}};
        S.prototype.findTreeParentLink = S.prototype.et = function(){var a = !0, b = this.h; null !== b && (a = b.pd); b = this.mc.k; if (a)for (; b.next(); ){if (a = b.value, a.Ec && a.aa !== this)return a} else for (; b.next(); )if (a = b.value, a.Ec && a.ca !== this)return a; return null};
        S.prototype.findTreeParentNode = S.prototype.dA = function(){if (null === this.Uh || this.Uh instanceof S)return this.Uh; var a = !0, b = this.h; null !== b && (a = b.pd); var b = this.mc.n, c = b.length; if (a)for (a = 0; a < c; a++){var d = b[a]; if (d.Ec && (d = d.aa, d !== this))return this.Uh = d} else for (a = 0; a < c; a++)if (d = b[a], d.Ec && (d = d.ca, d !== this))return this.Uh = d; return this.Uh = null};
        S.prototype.findTreeChildrenLinks = S.prototype.Bw = function(){var a = !0, b = this.h; null !== b && (a = b.pd); if (a){var a = new Ba(this.mc), c = this; a.sl = function(a){return a.Ec && a.aa === c?!0:!1}} else a = new Ba(this.mc), c = this, a.sl = function(a){return a.Ec && a.ca === c?!0:!1}; return a};
        S.prototype.findTreeChildrenNodes = S.prototype.BE = function(){var a = !0, b = this.h; null !== b && (a = b.pd); var c = b = null, d = this.mc.k; if (a)for (; d.next(); )a = d.value, a.Ec && a.aa === this && (a = a.ca, null !== b?b.add(a):null !== c && c !== a?(b = new B(S), b.add(c), b.add(a)):c = a); else for (; d.next(); )a = d.value, a.Ec && a.ca === this && (a = a.aa, null !== b?b.add(a):null !== c && c !== a?(b = new B(S), b.add(c), b.add(a)):c = a); return null !== b?b.k:null !== c?new Aa(c):t.Yf};
        S.prototype.findTreeParts = function(a){void 0 === a && (a = Infinity); t.i(a, "number", S, "collapseTree:level"); var b = new C(E); Je(b, this, !1, a); return b}; S.prototype.collapseTree = S.prototype.collapseTree = function(a){void 0 === a && (a = 1); t.q(a, S, "collapseTree:level"); 1 > a && (a = 1); var b = this.h; if (null !== b && !b.Ud){var c = b.Zb; 0 !== b.ja.Je && c.tl(); b.Ud = !0; var c = b.pd, d = new C(S); d.add(this); Pm(this, d, c, a, this.Oc); b.Ud = !1; b.ka()}};
        function Pm(a, b, c, d, f){if (1 < d)for (f = c?a.yw():a.tg(); f.next(); ){var g = f.value; g.Ec && (g = g.jA(a), null === g || g === a || b.contains(g) || (b.add(g), Pm(g, b, c, d - 1, g.Oc)))} else Qm(a, b, c, f)}function Qm(a, b, c, d){a.Oc = !1; for (var f = c?a.yw():a.tg(); f.next(); ){var g = f.value; d && g.Mf(); g.Ec && (g = g.jA(a), null === g || g === a || b.contains(g) || (b.add(g), d && (g.ka(), qk(g), g.gh(!1)), g.Oc && (g.pn = g.Oc, Qm(g, b, c, g.pn))))}}
S.prototype.expandTree = S.prototype.expandTree = function(a){void 0 === a && (a = 2); t.q(a, S, "collapseTree:level"); 2 > a && (a = 2); var b = this.h; if (null !== b && !b.Ud){var c = b.Zb; 0 !== b.ja.Je && c.tl(); b.Ud = !0; var d = b.pd, f = new C(S); f.add(this); Rm(this, f, d, a, this.Oc, c, this); b.Ud = !1}};
        function Rm(a, b, c, d, f, g, h){a.Oc = !0; for (var k = c?a.yw():a.tg(); k.next(); ){var l = k.value; l.Ec && (f || (l.og || l.ac(), l.updateAdornments()), l = l.jA(a), null !== l && l !== a && !b.contains(l) && (b.add(l), f || (l.gh(!0), qk(l), Oh(g, l, h)), 2 < d || l.pn)) && (l.pn = !1, Rm(l, b, c, d - 1, l.Oc, g, h))}}t.g(S, "isTreeExpanded", S.prototype.Oc);
        t.defineProperty(S, {Oc:"isTreeExpanded"}, function(){return this.cr}, function(a){var b = this.cr; if (b !== a){e && t.i(a, "boolean", S, "isTreeExpanded"); this.cr = a; var c = this.h; this.j("isTreeExpanded", b, a); b = this.IG; if (null !== b){var d = !0; null !== c && (d = c.Na, c.Na = !0); b(this); null !== c && (c.Na = d)}null !== c && c.ja.sb || (a?(a = 2, 2 > a && (a = 2), null === c || c.Ud || (0 !== c.ja.Je && c.Zb.tl(), c.Ud = !0, b = c.pd, d = new C(S), d.add(this), Rm(this, d, b, a, !1, c.Zb, this), c.Ud = !1)):(a = 1, 1 > a && (a = 1), null === c || c.Ud || (0 !== c.ja.Je && c.Zb.tl(), c.Ud = !0, b =
                c.pd, d = new C(S), d.add(this), Pm(this, d, b, a, !0), c.Ud = !1)))}}); t.g(S, "wasTreeExpanded", S.prototype.pn); t.defineProperty(S, {pn:"wasTreeExpanded"}, function(){return this.Gs}, function(a){var b = this.Gs; b !== a && (e && t.i(a, "boolean", S, "wasTreeExpanded"), this.Gs = a, this.j("wasTreeExpanded", b, a))}); t.g(S, "treeExpandedChanged", S.prototype.IG);
        t.defineProperty(S, {IG:"treeExpandedChanged"}, function(){return this.Bs}, function(a){var b = this.Bs; b !== a && (null !== a && t.i(a, "function", S, "treeExpandedChanged"), this.Bs = a, this.j("treeExpandedChanged", b, a))}); t.g(S, "isTreeLeaf", S.prototype.di); t.defineProperty(S, {di:"isTreeLeaf"}, function(){return this.dr}, function(a){var b = this.dr; b !== a && (e && t.i(a, "boolean", S, "isTreeLeaf"), this.dr = a, this.j("isTreeLeaf", b, a))});
        function V(){E.call(this, wg); this.bg = null; this.Bh = ""; this.ng = this.Oq = null; this.Rh = ""; this.As = null; this.Ur = this.Tr = this.Sr = !1; this.er = !0; this.kq = zg; this.xq = 0; this.Aq = zg; this.Bq = NaN; this.mm = Zk; this.os = 0.5; this.Ii = this.we = null; this.Cc = (new B(w)).freeze(); this.yo = this.xe = null; this.og = !1; this.mz = null; this.uz = !1; this.xn = this.ui = this.Oa = null; this.gf = 0; this.Jn = this.Fn = null; this.mi = new B(x); this.yz = new w; this.oD = this.mD = null; this.ny = !1; this.P = null}t.ga("Link", V); t.Ka(V, E);
        V.prototype.cloneProtected = function(a){E.prototype.cloneProtected.call(this, a); a.Bh = this.Bh; a.Oq = this.Oq; a.Rh = this.Rh; a.As = this.As; a.Sr = this.Sr; a.Tr = this.Tr; a.Ur = this.Ur; a.er = this.er; a.kq = this.kq; a.xq = this.xq; a.Aq = this.Aq; a.Bq = this.Bq; a.mm = this.mm; a.os = this.os; if (null !== this.P){var b = this.P; a.P = {Dh:b.Dh.Z(), Th:b.Th.Z(), Ah:b.Ah, Qh:b.Qh, zh:b.zh, Ph:b.Ph, Ch:b.Ch, Sh:b.Sh}} else a.P = null};
        V.prototype.Yh = function(a){E.prototype.Yh.call(this, a); this.Bh = a.Bh; this.Rh = a.Rh; a.Ii = null; a.xe = null; a.ac(); a.xn = this.xn; a.gf = this.gf}; var Zk; V.Normal = Zk = t.w(V, "Normal", 1); V.Orthogonal = t.w(V, "Orthogonal", 2); V.AvoidsNodes = t.w(V, "AvoidsNodes", 6); var Sm; V.AvoidsNodesStraight = Sm = t.w(V, "AvoidsNodesStraight", 7); var zg; V.None = zg = t.w(V, "None", 0); var Pg; V.Bezier = Pg = t.w(V, "Bezier", 9); var yg; V.JumpGap = yg = t.w(V, "JumpGap", 10); var xg; V.JumpOver = xg = t.w(V, "JumpOver", 11); var Wk; V.End = Wk = t.w(V, "End", 17); var Xk;
        V.Scale = Xk = t.w(V, "Scale", 18); var Yk; V.Stretch = Yk = t.w(V, "Stretch", 19); var em; V.OrientAlong = em = t.w(V, "OrientAlong", 21); var Tm; V.OrientPlus90 = Tm = t.w(V, "OrientPlus90", 22); var Um; V.OrientMinus90 = Um = t.w(V, "OrientMinus90", 23); var Vm; V.OrientOpposite = Vm = t.w(V, "OrientOpposite", 24); var Wm; V.OrientUpright = Wm = t.w(V, "OrientUpright", 25); var Xm; V.OrientPlus90Upright = Xm = t.w(V, "OrientPlus90Upright", 26); var Ym; V.OrientMinus90Upright = Ym = t.w(V, "OrientMinus90Upright", 27); var Zm;
        V.OrientUpright45 = Zm = t.w(V, "OrientUpright45", 28); V.prototype.Fe = function(){this.P = {Dh:xb, Th:xb, Ah:NaN, Qh:NaN, zh:Gm, Ph:Gm, Ch:NaN, Sh:NaN}}; V.prototype.nl = function(){var a = this.aa; if (null !== a){var b = a.findVisibleNode(); null !== b && (a = b); if (Qi(a) || Ri(a))return!1}a = this.ca; return null !== a && (b = a.findVisibleNode(), null !== b && (a = b), Qi(a) || Ri(a))?!1:!0}; V.prototype.Jd = function(){return!1};
        V.prototype.computeAngle = function(a, b, c){switch (b){default:case zg:a = 0; break; case em:a = c; break; case Tm:a = c + 90; break; case Um:a = c - 90; break; case Vm:a = c + 180; break; case Wm:a = H.Ct(c); 90 < a && 270 > a && (a -= 180); break; case Xm:a = H.Ct(c + 90); 90 < a && 270 > a && (a -= 180); break; case Ym:a = H.Ct(c - 90); 90 < a && 270 > a && (a -= 180); break; case Zm:a = H.Ct(c); if (45 < a && 135 > a || 225 < a && 315 > a)return 0; 90 < a && 270 > a && (a -= 180)}return H.Ct(a)}; t.g(V, "fromNode", V.prototype.aa);
        t.defineProperty(V, {aa:"fromNode"}, function(){return this.bg}, function(a){var b = this.bg; if (b !== a){e && null !== a && t.l(a, S, V, "fromNode"); var c = this.ud; null !== b && (this.ng !== b && Nm(b, this, c), $m(this), this.J(fj)); this.bg = a; this.ui = null; this.ac(); var d = this.h; if (null !== d){var f = this.data, g = d.ba; if (null !== f)if (g instanceof P){var h = null !== a?a.data:null; g.qx(f, g.Hb(h))} else g instanceof Ld && (h = null !== a?a.data:null, d.pd?g.lh(f, g.Hb(h)):(null !== b && g.lh(b.data, void 0), g.lh(h, g.Hb(null !== this.ng?this.ng.data:null))))}f =
                this.ud; g = this.iA; null !== g && (h = !0, null !== d && (h = d.Na, d.Na = !0), g(this, c, f), null !== d && (d.Na = h)); null !== a && (this.ng !== a && Mm(a, this, f), an(this), this.J($i)); this.j("fromNode", b, a); Gj(this)}}); t.g(V, "fromPortId", V.prototype.Of);
        t.defineProperty(V, {Of:"fromPortId"}, function(){return this.Bh}, function(a){var b = this.Bh; if (b !== a){e && t.i(a, "string", V, "fromPortId"); var c = this.ud; null !== c && Lm(this.aa, c); $m(this); this.Bh = a; var d = this.ud; null !== d && Lm(this.aa, d); var f = this.h; if (null !== f){var g = this.data, h = f.ba; null !== g && h instanceof P && h.aB(g, a)}c !== d && (this.ui = null, this.ac(), g = this.iA, null !== g && (h = !0, null !== f && (h = f.Na, f.Na = !0), g(this, c, d), null !== f && (f.Na = h))); an(this); this.j("fromPortId", b, a)}});
        t.A(V, {ud:"fromPort"}, function(){var a = this.bg; return null === a?null:a.fl(this.Bh)}); t.g(V, "fromPortChanged", V.prototype.iA); t.defineProperty(V, {iA:"fromPortChanged"}, function(){return this.Oq}, function(a){var b = this.Oq; b !== a && (null !== a && t.i(a, "function", V, "fromPortChanged"), this.Oq = a, this.j("fromPortChanged", b, a))}); t.g(V, "toNode", V.prototype.ca);
        t.defineProperty(V, {ca:"toNode"}, function(){return this.ng}, function(a){var b = this.ng; if (b !== a){e && null !== a && t.l(a, S, V, "toNode"); var c = this.de; null !== b && (this.bg !== b && Nm(b, this, c), $m(this), this.J(fj)); this.ng = a; this.ui = null; this.ac(); var d = this.h; if (null !== d){var f = this.data, g = d.ba; if (null !== f)if (g instanceof P){var h = null !== a?a.data:null; g.tx(f, g.Hb(h))} else g instanceof Ld && (h = null !== a?a.data:null, d.pd?(null !== b && g.lh(b.data, void 0), g.lh(h, g.Hb(null !== this.bg?this.bg.data:null))):g.lh(f, g.Hb(h)))}f =
                this.de; g = this.lB; null !== g && (h = !0, null !== d && (h = d.Na, d.Na = !0), g(this, c, f), null !== d && (d.Na = h)); null !== a && (this.bg !== a && Mm(a, this, f), an(this), this.J($i)); this.j("toNode", b, a); Gj(this)}}); t.g(V, "toPortId", V.prototype.Mg);
        t.defineProperty(V, {Mg:"toPortId"}, function(){return this.Rh}, function(a){var b = this.Rh; if (b !== a){e && t.i(a, "string", V, "toPortId"); var c = this.de; null !== c && Lm(this.ca, c); $m(this); this.Rh = a; var d = this.de; null !== d && Lm(this.ca, d); var f = this.h; if (null !== f){var g = this.data, h = f.ba; null !== g && h instanceof P && h.dB(g, a)}c !== d && (this.ui = null, this.ac(), g = this.lB, null !== g && (h = !0, null !== f && (h = f.Na, f.Na = !0), g(this, c, d), null !== f && (f.Na = h))); an(this); this.j("toPortId", b, a)}});
        t.A(V, {de:"toPort"}, function(){var a = this.ng; return null === a?null:a.fl(this.Rh)}); t.g(V, "toPortChanged", V.prototype.lB); t.defineProperty(V, {lB:"toPortChanged"}, function(){return this.As}, function(a){var b = this.As; b !== a && (null !== a && t.i(a, "function", V, "toPortChanged"), this.As = a, this.j("toPortChanged", b, a))});
        t.defineProperty(V, {pb:"fromSpot"}, function(){return null !== this.P?this.P.Dh:xb}, function(a){null === this.P && this.Fe(); var b = this.P.Dh; b.M(a) || (e && t.l(a, I, V, "fromSpot"), a = a.Z(), this.P.Dh = a, this.j("fromSpot", b, a), this.ac())});
        t.defineProperty(V, {ck:"fromEndSegmentLength"}, function(){return null !== this.P?this.P.Ah:NaN}, function(a){null === this.P && this.Fe(); var b = this.P.Ah; b !== a && (e && t.i(a, "number", V, "fromEndSegmentLength"), 0 > a && t.la(a, ">= 0", V, "fromEndSegmentLength"), this.P.Ah = a, this.j("fromEndSegmentLength", b, a), this.ac())});
        t.defineProperty(V, {gp:"fromEndSegmentDirection"}, function(){return null !== this.P?this.P.zh:Gm}, function(a){null === this.P && this.Fe(); var b = this.P.zh; b !== a && (e && t.Aa(a, S, V, "fromEndSegmentDirection"), this.P.zh = a, this.j("fromEndSegmentDirection", b, a), this.ac())}); t.defineProperty(V, {hp:"fromShortLength"}, function(){return null !== this.P?this.P.Ch:NaN}, function(a){null === this.P && this.Fe(); var b = this.P.Ch; b !== a && (e && t.i(a, "number", V, "fromShortLength"), this.P.Ch = a, this.j("fromShortLength", b, a), this.ac())});
        t.defineProperty(V, {tb:"toSpot"}, function(){return null !== this.P?this.P.Th:xb}, function(a){null === this.P && this.Fe(); var b = this.P.Th; b.M(a) || (e && t.l(a, I, V, "toSpot"), a = a.Z(), this.P.Th = a, this.j("toSpot", b, a), this.ac())});
        t.defineProperty(V, {ik:"toEndSegmentLength"}, function(){return null !== this.P?this.P.Qh:NaN}, function(a){null === this.P && this.Fe(); var b = this.P.Qh; b !== a && (e && t.i(a, "number", V, "toEndSegmentLength"), 0 > a && t.la(a, ">= 0", V, "toEndSegmentLength"), this.P.Qh = a, this.j("toEndSegmentLength", b, a), this.ac())});
        t.defineProperty(V, {Wp:"toEndSegmentDirection"}, function(){return null !== this.P?this.P.Ph:Gm}, function(a){null === this.P && this.Fe(); var b = this.P.Ph; b !== a && (e && t.Aa(a, S, V, "toEndSegmentDirection"), this.P.Ph = a, this.j("toEndSegmentDirection", b, a), this.ac())}); t.defineProperty(V, {Xp:"toShortLength"}, function(){return null !== this.P?this.P.Sh:NaN}, function(a){null === this.P && this.Fe(); var b = this.P.Sh; b !== a && (e && t.i(a, "number", V, "toShortLength"), this.P.Sh = a, this.j("toShortLength", b, a), this.ac())});
        function Gj(a){var b = a.aa, c = a.ca; null !== b && null !== c?bn(a, b.CI(c)):bn(a, null)}function bn(a, b){var c = a.yk; if (c !== b){null !== c && Am(c, a); a.yk = b; null !== b && Bm(b, a); var d = a.Wz; if (null !== d){var f = !0, g = a.h; null !== g && (f = g.Na, g.Na = !0); d(a, c, b); null !== g && (g.Na = f)}!a.og || a.mD !== c && a.oD !== c || a.ac()}}V.prototype.getOtherNode = V.prototype.jA = function(a){e && t.l(a, S, V, "getOtherNode:node"); var b = this.aa; return a === b?this.ca:b};
        V.prototype.getOtherPort = function(a){e && t.l(a, Q, V, "getOtherPort:port"); var b = this.ud; return a === b?this.de:b}; t.A(V, {xK:"isLabeledLink"}, function(){return null === this.we?!1:0 < this.we.count}); t.A(V, {ek:"labelNodes"}, function(){return null === this.we?t.Yf:this.we.k}); function Om(a, b){null === a.we && (a.we = new C(S)); a.we.add(b); a.fa()}
V.prototype.kt = function(a){E.prototype.kt.call(this, a); cn(this) && Ag(this, this.pa); if (!a){a = this.bg; var b = this.ng; null !== a && (Mm(a, this, this.ud), an(this)); null !== b && (Mm(b, this, this.de), an(this))}}; V.prototype.lt = function(a){E.prototype.lt.call(this, a); cn(this) && Ag(this, this.pa); if (!a){a = this.bg; var b = this.ng; null !== a && (Nm(a, this, this.ud), $m(this)); null !== b && (Nm(b, this, this.de), $m(this))}};
        V.prototype.Mm = function(){this.og = !0; if (null !== this.we){var a = this.h; if (null === a)return; for (var b = this.we.copy().k; b.next(); )a.remove(b.value)}b = this.data; null !== b && (a = this.h, null !== a && (a = a.ba, a instanceof P?a.VA(b):a instanceof Ld && a.lh(b, void 0)))};
        V.prototype.updateModelDataReferences = function(){var a = this.data; if (null !== a){var b = this.h; if (null !== b){var c = b.ba; if (c instanceof P){var d = c.hl(a), f = b.Ve(d), g = this.aa; f !== g && (f = null !== g?c.Hb(g.data):void 0, g = c.Ym, "function" === typeof g?g(a, f):a[g] = f, c.qx(a, d)); d = c.ll(a); f = b.Ve(d); g = this.ca; f !== g && (f = null !== g?c.Hb(g.data):void 0, g = c.Zm, "function" === typeof g?g(a, f):a[g] = f, c.tx(a, d))}}}};
        V.prototype.move = V.prototype.move = function(a){var b = this.position, c = b.x; isNaN(c) && (c = 0); b = b.y; isNaN(b) && (b = 0); c = a.x - c; b = a.y - b; E.prototype.move.call(this, a); this.pl(c, b); for (a = this.ek; a.next(); ){var d = a.value, f = d.position; d.moveTo(f.x + c, f.y + b)}}; t.g(V, "relinkableFrom", V.prototype.KF); t.defineProperty(V, {KF:"relinkableFrom"}, function(){return this.Sr}, function(a){var b = this.Sr; b !== a && (e && t.i(a, "boolean", V, "relinkableFrom"), this.Sr = a, this.j("relinkableFrom", b, a), this.updateAdornments())});
        t.g(V, "relinkableTo", V.prototype.LF); t.defineProperty(V, {LF:"relinkableTo"}, function(){return this.Tr}, function(a){var b = this.Tr; b !== a && (e && t.i(a, "boolean", V, "relinkableTo"), this.Tr = a, this.j("relinkableTo", b, a), this.updateAdornments())}); V.prototype.canRelinkFrom = function(){if (!this.KF)return!1; var a = this.layer; if (null === a)return!0; if (!a.Tj)return!1; a = a.h; return null === a || a.Tj?!0:!1};
        V.prototype.canRelinkTo = function(){if (!this.LF)return!1; var a = this.layer; if (null === a)return!0; if (!a.Tj)return!1; a = a.h; return null === a || a.Tj?!0:!1}; t.g(V, "resegmentable", V.prototype.Jp); t.defineProperty(V, {Jp:"resegmentable"}, function(){return this.Ur}, function(a){var b = this.Ur; b !== a && (e && t.i(a, "boolean", V, "resegmentable"), this.Ur = a, this.j("resegmentable", b, a), this.updateAdornments())}); t.g(V, "isTreeLink", V.prototype.Ec);
        t.defineProperty(V, {Ec:"isTreeLink"}, function(){return this.er}, function(a){var b = this.er; b !== a && (e && t.i(a, "boolean", V, "isTreeLink"), this.er = a, this.j("isTreeLink", b, a), null !== this.aa && Lj(this.aa), null !== this.ca && Lj(this.ca))}); t.A(V, {path:"path"}, function(){var a = this.Ii; if (null !== a)return a; a = this.xa; a = Ek(this, a, a.length); return a instanceof W?this.Ii = a:null}); V.prototype.Qq = function(){return this.path}; V.prototype.Py = function(){return this.Cc};
        V.prototype.uj = function(){this.updateRoute(); var a = new x; this.pf(a); return this.mz = a};
        V.prototype.pf = function(a){var b = Infinity, c = Infinity, d = this.oa; if (0 === d)return a.p(NaN, NaN, 0, 0), a; if (1 === d)d = this.o(0), b = Math.min(d.x, b), c = Math.min(d.y, c), a.p(d.x, d.y, 0, 0); else if (2 === d){var f = this.o(0), g = this.o(1), b = Math.min(f.x, g.x), c = Math.min(f.y, g.y); a.p(f.x, f.y, 0, 0); a.jj(g)} else if (this.computeCurve() === Pg && 3 <= d && !this.ic)if (f = this.o(0), b = f.x, c = f.y, a.p(b, c, 0, 0), 3 === d)d = this.o(1), b = Math.min(d.x, b), c = Math.min(d.y, c), g = this.o(2), b = Math.min(g.x, b), c = Math.min(g.y, c), H.So(f.x, f.y, d.x, d.y, d.x, d.y, g.x,
                g.y, 0.5, a); else for (var h, k, l = 3; l < d; l += 3)h = this.o(l - 2), l + 3 >= d && (l = d - 1), k = this.o(l - 1), g = this.o(l), H.So(f.x, f.y, h.x, h.y, k.x, k.y, g.x, g.y, 0.5, a), b = Math.min(g.x, b), c = Math.min(g.y, c), f = g; else for (f = this.o(0), g = this.o(1), b = Math.min(f.x, g.x), c = Math.min(f.y, g.y), a.p(f.x, f.y, 0, 0), a.jj(g), l = 2; l < d; l++)f = this.o(l), b = Math.min(f.x, b), c = Math.min(f.y, c), a.jj(f); this.yz.p(b - a.x, c - a.y); return a}; t.A(V, {xF:"midPoint"}, function(){this.updateRoute(); return this.computeMidPoint(new w)});
        V.prototype.computeMidPoint = function(a){var b = this.oa; if (0 === b)return a.assign(H.bH), a; if (1 === b)return a.assign(this.o(0)), a; if (2 === b){var c = this.o(0), d = this.o(1); a.p((c.x + d.x) / 2, (c.y + d.y) / 2); return a}if (this.computeCurve() === Pg && 3 <= b && !this.ic){if (3 === b)return this.o(1); var b = (b - 1) / 3 | 0, f = 3 * (b / 2 | 0); 1 === b % 2?(c = this.o(f), d = this.o(f + 1), b = this.o(f + 2), f = this.o(f + 3), H.ZH(c.x, c.y, d.x, d.y, b.x, b.y, f.x, f.y, a)):a.assign(this.o(f)); return a}for (var f = 0, g = t.Cb(), h = 0; h < b - 1; h++)c = this.o(h), d = this.o(h + 1), H.nb(c.x,
                d.x)?(c = d.y - c.y, 0 > c && (c = - c)):H.nb(c.y, d.y)?(c = d.x - c.x, 0 > c && (c = - c)):c = Math.sqrt(c.Zj(d)), g.push(c), f += c; for (d = h = c = 0; c < f / 2 && h < b; ){d = g[h]; if (c + d > f / 2)break; c += d; h++}t.ya(g); b = this.o(h); g = this.o(h + 1); b.x === g.x?b.y > g.y?a.p(b.x, b.y - (f / 2 - c)):a.p(b.x, b.y + (f / 2 - c)):b.y === g.y?b.x > g.x?a.p(b.x - (f / 2 - c), b.y):a.p(b.x + (f / 2 - c), b.y):(f = (f / 2 - c) / d, a.p(b.x + f * (g.x - b.x), b.y + f * (g.y - b.y))); return a}; t.A(V, {wF:"midAngle"}, function(){this.updateRoute(); return this.computeMidAngle()});
        V.prototype.computeMidAngle = function(){var a = this.oa; if (2 > a)return NaN; if (this.computeCurve() === Pg && 4 <= a && !this.ic){var b = (a - 1) / 3 | 0, c = 3 * (b / 2 | 0); if (1 === b % 2){var c = Math.floor(c), a = this.o(c), b = this.o(c + 1), d = this.o(c + 2), c = this.o(c + 3); return H.YH(a.x, a.y, b.x, b.y, d.x, d.y, c.x, c.y)}if (0 < c && c + 1 < a)return a = this.o(c - 1), b = this.o(c + 1), a.Zi(b)}d = a / 2 | 0; if (0 === a % 2)return a = this.o(d - 1), b = this.o(d), a.Zi(b); var a = this.o(d - 1), b = this.o(d), d = this.o(d + 1), c = a.Zj(b), f = b.Zj(d); return c > f?a.Zi(b):b.Zi(d)}; t.g(V, "points", V.prototype.points);
        t.defineProperty(V, {points:"points"}, function(){return this.Cc}, function(a){var b = this.Cc; if (b !== a){e && (Array.isArray(a) || a instanceof B || t.m("Link.points value is not an instance of List or Array")); var c = a; if (Array.isArray(a)){var d = 0 === a.length % 2; if (d)for (var f = 0; f < a.length; f++)if ("number" !== typeof a[f]){d = !1; break}if (d)for (c = new B(w), d = 0; d < a.length / 2; d++)f = (new w(a[2 * d], a[2 * d + 1])).freeze(), c.add(f); else t.m("Link.points array must contain only numbers")} else for (c = a.copy(), a = c.k; a.next(); )a.value.freeze();
                c.freeze(); this.Cc = c; this.Ye(); dn(this); this.h && this.h.Zb.sd && (this.yo = c); this.j("points", b, c)}}); t.A(V, {oa:"pointsCount"}, function(){return this.Cc.count}); V.prototype.getPoint = V.prototype.o = function(a){return this.Cc.n[a]}; V.prototype.setPoint = V.prototype.Bf = function(a, b){e && (t.l(b, w, V, "setPoint"), b.N() || t.m("Link.setPoint called with a Point that does not have real numbers: " + b.toString())); null === this.xe && t.m("Call Link.startRoute before modifying the points of the route."); this.Cc.Kg(a, b)};
        V.prototype.setPointAt = V.prototype.Y = function(a, b, c){e && (t.q(b, V, "setPointAt:x"), t.q(c, V, "setPointAt:y")); null === this.xe && t.m("Call Link.startRoute before modifying the points of the route."); this.Cc.Kg(a, new w(b, c))}; V.prototype.insertPoint = function(a, b){e && (t.l(b, w, V, "insertPoint"), b.N() || t.m("Link.insertPoint called with a Point that does not have real numbers: " + b.toString())); null === this.xe && t.m("Call Link.startRoute before modifying the points of the route."); this.Cc.Gd(a, b)};
        V.prototype.insertPointAt = V.prototype.C = function(a, b, c){e && (t.q(b, V, "insertPointAt:x"), t.q(c, V, "insertPointAt:y")); null === this.xe && t.m("Call Link.startRoute before modifying the points of the route."); this.Cc.Gd(a, new w(b, c))}; V.prototype.addPoint = V.prototype.Vh = function(a){e && (t.l(a, w, V, "addPoint"), a.N() || t.m("Link.addPoint called with a Point that does not have real numbers: " + a.toString())); null === this.xe && t.m("Call Link.startRoute before modifying the points of the route."); this.Cc.add(a)};
        V.prototype.addPointAt = V.prototype.Wk = function(a, b){e && (t.q(a, V, "insertPointAt:x"), t.q(b, V, "insertPointAt:y")); null === this.xe && t.m("Call Link.startRoute before modifying the points of the route."); this.Cc.add(new w(a, b))}; V.prototype.removePoint = V.prototype.NF = function(a){null === this.xe && t.m("Call Link.startRoute before modifying the points of the route."); this.Cc.qd(a)};
        V.prototype.clearPoints = V.prototype.Uo = function(){null === this.xe && t.m("Call Link.startRoute before modifying the points of the route."); this.Cc.clear()}; V.prototype.movePoints = V.prototype.pl = function(a, b){for (var c = new B(w), d = this.Cc.k; d.next(); ){var f = d.value; c.add((new w(f.x + a, f.y + b)).freeze())}c.freeze(); d = this.Cc; this.Cc = c; this.Ye(); dn(this); this.h && this.h.Zb.sd && (this.yo = c); this.j("points", d, c)}; V.prototype.startRoute = V.prototype.yl = function(){null === this.xe && (this.xe = this.Cc, this.Cc = this.Cc.copy())};
        V.prototype.commitRoute = V.prototype.Vi = function(){if (null !== this.xe){for (var a = this.xe, b = this.Cc, c = Infinity, d = Infinity, f = a.count, g = 0; g < f; g++)var h = a.n[g], c = Math.min(h.x, c), d = Math.min(h.y, d); for (var k = Infinity, l = Infinity, m = b.count, g = 0; g < m; g++)h = b.n[g], k = Math.min(h.x, k), l = Math.min(h.y, l), h.freeze(); b.freeze(); if (m === f)for (g = 0; g < m; g++){if (f = a.n[g], h = b.n[g], f.x - c !== h.x - k || f.y - d !== h.y - l){this.Ye(); break}} else this.Ye(); this.xe = null; this.h && this.h.Zb.sd && (this.yo = b); dn(this); this.j("points", a, b)}};
        V.prototype.rollbackRoute = V.prototype.HJ = function(){null !== this.xe && (this.Cc = this.xe, this.xe = null)}; function dn(a){0 === a.Cc.count?a.og = !1:(a.og = !0, a.Fn = a.o(0).copy(), a.Jn = a.o(a.oa - 1).copy(), en(a, !1))}V.prototype.invalidateRoute = V.prototype.ac = function(){if (!(this.uz || this.h && this.h.ja.sb)){var a = this.Qq(); null !== a && (this.og = !1, this.Ye(), a.fa())}}; t.defineProperty(V, {Vp:null}, function(){return this.uz}, function(a){this.uz = a});
        V.prototype.updateRoute = function(){if (!this.og && !this.ny){var a = !0; try{this.ny = !0, this.yl(), a = this.computePoints()} finally{this.ny = !1, a?this.Vi():this.HJ()}}};
        V.prototype.computePoints = function(){var a = this.h; if (null === a)return!1; var b = this.aa, c = null; null === b?(a.nm || (a.yv = new W, a.yv.Ca = H.fq, a.yv.fb = 0, a.nm = new S, a.nm.add(a.yv), a.nm.rf()), this.Fn && (a.nm.position = a.nm.location = this.Fn, a.nm.rf(), b = a.nm, c = a.yv)):c = this.ud; if (null !== c){var d = Ok(c); d !== b && b.Sa()?c = d:(d = b.findVisibleNode(), null !== d && d !== b?(b = d, c = d.fl("")):b = d)}this.mD = b; if (null === b || null === c || !b.location.N())return!1; var d = this.ca, f = null; null === d?(a.om || (a.zv = new W, a.zv.Ca = H.fq, a.zv.fb = 0, a.om =
                new S, a.om.add(a.zv), a.om.rf()), this.Jn && (a.om.position = a.om.location = this.Jn, a.om.rf(), d = a.om, f = a.zv)):f = this.de; null !== f && (a = Ok(f), a !== d && d.Sa()?f = a:(a = d.findVisibleNode(), null !== a && a !== d?(d = a, f = a.fl("")):d = a)); this.oD = d; if (null === d || null === f || !d.location.N())return!1; var a = this.oa, g = fn(this, c), h = gn(this, f), k = c === f && null !== c, l = this.ic, m = this.De === Pg; this.ui = k && !l?m = !0:!1; var n = this.Lo === zg || k; if (l || g !== wb || h !== wb || k){m = this.cj; n && (l && m || k) && this.Uo(); var p = k?this.computeCurviness():0, q = this.getLinkPoint(b,
                c, g, !0, l, d, f), r = 0, s = 0, u = 0; if (l || g !== wb || k){var v = this.computeEndSegmentLength(b, c, g, !0), u = this.getLinkDirection(b, c, q, g, !0, l, d, f); k && (u -= l?90:30, 0 > p && (u -= 180)); 0 > u?u += 360:360 <= u && (u -= 360); k && (v += Math.abs(p)); 0 === u?r = v:90 === u?s = v:180 === u?r = - v:270 === u?s = - v:(r = v * Math.cos(u * Math.PI / 180), s = v * Math.sin(u * Math.PI / 180)); if (g.Ge() && k){var D = c.qb(Kb, t.K()), A = t.lc(D.x + 1E3 * r, D.y + 1E3 * s); this.getLinkPointFromPoint(b, c, D, A, !0, q); t.B(D); t.B(A)}}var v = this.getLinkPoint(d, f, h, !1, l, b, c), G = 0, L = 0, N = 0; if (l || h !== wb || k)D =
                this.computeEndSegmentLength(d, f, h, !1), N = this.getLinkDirection(d, f, v, h, !1, l, b, c), k && (N += l?0:30, 0 > p && (N += 180)), 0 > N?N += 360:360 <= N && (N -= 360), k && (D += Math.abs(p)), 0 === N?G = D:90 === N?L = D:180 === N?G = - D:270 === N?L = - D:(G = D * Math.cos(N * Math.PI / 180), L = D * Math.sin(N * Math.PI / 180)), h.Ge() && k && (D = f.qb(Kb, t.K()), A = t.lc(D.x + 1E3 * G, D.y + 1E3 * L), this.getLinkPointFromPoint(d, f, D, A, !1, v), t.B(D), t.B(A)); f = q; if (l || g !== wb || k)f = new w(q.x + r, q.y + s); c = v; if (l || h !== wb || k)c = new w(v.x + G, v.y + L); !n && !l && g === wb && 3 < a && this.adjustPoints(0, q,
                a - 2, c)?this.Bf(a - 1, v):!n && !l && h === wb && 3 < a && this.adjustPoints(1, f, a - 1, v)?this.Bf(0, q):!n && !l && 4 < a && this.adjustPoints(1, f, a - 2, c)?(this.Bf(0, q), this.Bf(a - 1, v)):!n && l && 6 <= a && !m && this.adjustPoints(1, f, a - 2, c)?(this.Bf(0, q), this.Bf(a - 1, v)):(this.Uo(), this.Vh(q), (l || g !== wb || k) && this.Vh(f), l && this.addOrthoPoints(f, u, c, N, b, d), (l || h !== wb || k) && this.Vh(c), this.Vh(v))} else g = !1, !n && 3 <= a && (n = this.getLinkPoint(b, c, wb, !0, !1, d, f), g = this.getLinkPoint(d, f, wb, !1, !1, b, c), g = this.adjustPoints(0, n, a - 1, g)), g || (this.Uo(), m?
                (a = this.getLinkPoint(b, c, wb, !0, !1, d, f), n = this.getLinkPoint(d, f, wb, !1, !1, b, c), g = n.x - a.x, h = n.y - a.y, k = this.computeCurviness(), m = l = 0, q = a.x + g / 3, u = a.y + h / 3, r = q, s = u, H.I(h, 0)?s = 0 < g?s - k:s + k:(l = - g / h, m = Math.sqrt(k * k / (l * l + 1)), 0 > k && (m = - m), r = (0 > h? - 1:1) * m + q, s = l * (r - q) + u), q = a.x + 2 * g / 3, u = a.y + 2 * h / 3, v = q, G = u, H.I(h, 0)?G = 0 < g?G - k:G + k:(v = (0 > h? - 1:1) * m + q, G = l * (v - q) + u), this.Uo(), this.Vh(a), this.Wk(r, s), this.Wk(v, G), this.Vh(n), this.Bf(0, this.getLinkPoint(b, c, wb, !0, !1, d, f)), this.Bf(3, this.getLinkPoint(d, f, wb, !1, !1, b, c))):(a = d, d =
                this.getLinkPoint(b, c, wb, !0, !1, a, f), f = this.getLinkPoint(a, f, wb, !1, !1, b, c), this.hasCurviness()?(h = f.x - d.x, b = f.y - d.y, c = this.computeCurviness(), a = d.x + h / 2, n = d.y + b / 2, g = a, k = n, H.I(b, 0)?k = 0 < h?k - c:k + c:(h = - h / b, g = Math.sqrt(c * c / (h * h + 1)), 0 > c && (g = - g), g = (0 > b? - 1:1) * g + a, k = h * (g - a) + n), this.Vh(d), this.Wk(g, k)):this.Vh(d), this.Vh(f))); return!0}; function hn(a, b){Math.abs(b.x - a.x) > Math.abs(b.y - a.y)?(b.x = b.x >= a.x?a.x + 9E9:a.x - 9E9, b.y = a.y):(b.y = b.y >= a.y?a.y + 9E9:a.y - 9E9, b.x = a.x); return b}
V.prototype.getLinkPointFromPoint = function(a, b, c, d, f, g){void 0 === g && (g = new w); if (null === a || null === b)return g.assign(c), g; a.Sa() || (f = a.findVisibleNode(), null !== f && f !== a && (b = f.port)); var h; a = null; f = b.ia; null === f || f.Ef() || (f = f.ia); if (null === f)f = d.x, d = d.y, h = c.x, c = c.y; else{a = f.ke; f = 1 / (a.m11 * a.m22 - a.m12 * a.m21); h = a.m22 * f; var k = - a.m12 * f, l = - a.m21 * f, m = a.m11 * f, n = f * (a.m21 * a.dy - a.m22 * a.dx), p = f * (a.m12 * a.dx - a.m11 * a.dy); f = d.x * h + d.y * l + n; d = d.x * k + d.y * m + p; h = c.x * h + c.y * l + n; c = c.x * k + c.y * m + p}b.jp(f, d, h, c, g); a && g.transform(a);
        return g}; function jn(a, b){var c = b.Nr; null === c && (c = new kn, c.port = b, c.Fc = b.S, b.Nr = c); return ln(c, a)}
V.prototype.getLinkPoint = function(a, b, c, d, f, g, h, k){void 0 === k && (k = new w); if (c.vd())return b.qb(c, k), k; if (c.qp() && (c = jn(this, b), null !== c)){k.assign(c.wp); if (f && this.Jt === Sm){var l = jn(this, h); if (c.Jm < l.Jm){c = t.K(); var l = t.K(), m = new x(b.qb(Eb, c), b.qb(Pb, l)), n = this.computeSpot(!d); a = this.getLinkPoint(g, h, n, !d, f, a, b, l); a.x >= m.x && a.x <= m.x + m.width?k.x = a.x:a.y >= m.y && a.y <= m.y + m.height && (k.y = a.y); t.B(c); t.B(l)}}return k}g = b.qb(Kb, t.K()); c = null; this.oa > (f?6:2)?(h = d?this.o(1):this.o(this.oa - 2), f && (h = hn(g, h.copy()))):
        (c = t.K(), h = h.qb(Kb, c), f && (h = hn(g, h))); this.getLinkPointFromPoint(a, b, g, h, d, k); t.B(g); null !== c && t.B(c); return k};
        V.prototype.getLinkDirection = function(a, b, c, d, f, g, h, k){a:if (d.vd())c = d.x > d.y?d.x > 1 - d.y?0:d.x < 1 - d.y?270:315:d.x < d.y?d.x > 1 - d.y?90:d.x < 1 - d.y?180:135:0.5 > d.x?225:0.5 < d.x?45:0; else{if (d.qp() && (a = jn(this, b), null !== a))switch (a.$d){case t.ad:c = 270; break a; case t.Hc:c = 180; break a; default:case t.Qc:c = 0; break a; case t.Pc:c = 90; break a}a = b.qb(Kb, t.K()); d = null; this.oa > (g?6:2)?(k = f?this.o(1):this.o(this.oa - 2), k = g?hn(a, k.copy()):c):(d = t.K(), k = k.qb(Kb, d)); c = Math.abs(k.x - a.x) > Math.abs(k.y - a.y)?k.x >= a.x?0:180:k.y >=
                a.y?90:270; t.B(a); null !== d && t.B(d)}g = Gm; g = f?this.gp:this.Wp; g === Gm && (g = f?b.gp:b.Wp); switch (g){case Hm:b = b.gl(); c += b; 360 <= c && (c -= 360); break; case Gm:case ek:b = b.gl(); if (0 === b)break; 45 <= b && 135 > b?c += 90:135 <= b && 225 > b?c += 180:225 <= b && 315 > b && (c += 270); 360 <= c && (c -= 360)}return c}; V.prototype.computeEndSegmentLength = function(a, b, c, d){if (null !== b && c.qp() && (a = jn(this, b), null !== a))return a.ww; a = NaN; a = d?this.ck:this.ik; null !== b && isNaN(a) && (a = d?b.ck:b.ik); isNaN(a) && (a = 10); return a};
        V.prototype.computeSpot = function(a){return a?fn(this, this.ud):gn(this, this.de)}; function fn(a, b){if (null === b)return Kb; var c = a.pb; c.Nc() && (void 0 === b && (b = a.ud), null !== b && (c = b.pb)); return c === xb?wb:c}function gn(a, b){if (null === b)return Kb; var c = a.tb; c.Nc() && (void 0 === b && (b = a.de), null !== b && (c = b.tb)); return c === xb?wb:c}V.prototype.computeOtherPoint = function(a, b){var c = b.qb(Kb), d; d = b.Nr; d = null !== d?ln(d, this):null; null !== d && (c = d.wp); return c};
        V.prototype.computeShortLength = function(a){return a?mn(this):nn(this)}; function mn(a){var b = a.hp; isNaN(b) && (a = a.ud, null !== a && (b = a.hp)); return isNaN(b)?0:b}function nn(a){var b = a.Xp; isNaN(b) && (a = a.de, null !== a && (b = a.Xp)); return isNaN(b)?0:b}
V.prototype.ak = function(a, b, c, d, f, g){if (!1 === this.zf)return!1; void 0 === b && (b = null); void 0 === c && (c = null); var h = g; void 0 === g && (h = t.oh(), h.reset()); h.multiply(this.transform); if (this.Hm(a, h))return Wl(this, b, c, f), void 0 === g && t.We(h), !0; if (this.Qf(a, h)){var k = !1; if (!this.Tg)for (var l = this.xa.length; l--; ){var m = this.xa.n[l]; if (m.visible || m === this.kc){var n = m.pa, p = this.Qa; if (!(n.x > p.width || n.y > p.height || 0 > n.x + n.width || 0 > n.y + n.height)){n = t.oh(); n.set(h); if (m instanceof y)k = m.ak(a, b, c, d, f, n); else if (this.path ===
        m){var k = m, q = a, r = d, p = n; if (!1 === k.zf)k = !1; else if (p.multiply(k.transform), r)b:{var s = q, u = p; if (k.Hm(s, u))k = !0; else{if (void 0 === u && (u = k.transform, s.Wj(k.pa))){k = !0; break b}var p = s.left, q = s.right, r = s.top, s = s.bottom, v = t.K(), D = t.K(), A = t.K(), G = t.oh(); G.set(u); G.CF(k.transform); G.nA(); D.x = q; D.y = r; D.transform(G); v.x = p; v.y = r; v.transform(G); u = !1; cm(k, v, D, A)?u = !0:(v.x = q, v.y = s, v.transform(G), cm(k, v, D, A)?u = !0:(D.x = p, D.y = s, D.transform(G), cm(k, v, D, A)?u = !0:(v.x = p, v.y = r, v.transform(G), cm(k, v, D, A) && (u = !0)))); t.We(G);
        t.B(v); t.B(D); t.B(A); k = u}} else k = k.Hm(q, p)} else k = jk(m, a, d, n); k && (null !== b && (m = b(m)), m && (null === c || c(m)) && f.add(m)); t.We(n)}}}void 0 === g && t.We(h); return k || null !== this.background || null !== this.Zk}void 0 === g && t.We(h); return!1}; t.A(V, {ic:"isOrthogonal"}, function(){return 2 === (this.mm.value & 2)}); t.A(V, {cj:"isAvoiding"}, function(){return 4 === (this.mm.value & 4)}); V.prototype.computeCurve = function(){if (null === this.ui){var a = this.ud, b = this.ic; this.ui = null !== a && a === this.de && !b}return this.ui?Pg:this.De};
        V.prototype.computeCorner = function(){if (this.De === Pg)return 0; var a = this.ow; if (isNaN(a) || 0 > a)a = 10; return a}; V.prototype.computeCurviness = function(){var a = this.Ws; if (isNaN(a)){var b = this.gf; if (0 !== b){var a = 10, c = this.h; null !== c && (a = c.xp); c = Math.abs(b); a = a / 2 + ((c - 1) / 2 | 0) * a; 0 === c % 2 && (a = - a); 0 > b && (a = - a)} else a = 10}return a}; V.prototype.computeThickness = function(){var a = this.path; return null !== a?Math.max(a.fb, 1):1}; V.prototype.hasCurviness = function(){return!isNaN(this.Ws) || 0 !== this.gf && !this.ic};
        V.prototype.adjustPoints = function(a, b, c, d){var f = this.Lo; if (this.ic){if (f === Xk)return!1; f === Yk && (f = Wk)}switch (f){case Xk:var g = this.o(a), h = this.o(c); if (!g.M(b) || !h.M(d)){var f = g.x, g = g.y, k = h.x - f, l = h.y - g, m = Math.sqrt(k * k + l * l); if (!H.I(m, 0)){var n; H.I(k, 0)?n = 0 > l? - Math.PI / 2:Math.PI / 2:(n = Math.atan(l / Math.abs(k)), 0 > k && (n = Math.PI - n)); var h = b.x, p = b.y, k = d.x - h, q = d.y - p, l = Math.sqrt(k * k + q * q); H.I(k, 0)?q = 0 > q? - Math.PI / 2:Math.PI / 2:(q = Math.atan(q / Math.abs(k)), 0 > k && (q = Math.PI - q)); m = l / m; n = q - n; this.Bf(a, b); for (a += 1; a < c; a++)b =
                this.o(a), k = b.x - f, l = b.y - g, b = Math.sqrt(k * k + l * l), H.I(b, 0) || (H.I(k, 0)?l = 0 > l? - Math.PI / 2:Math.PI / 2:(l = Math.atan(l / Math.abs(k)), 0 > k && (l = Math.PI - l)), k = l + n, b *= m, this.Y(a, h + b * Math.cos(k), p + b * Math.sin(k))); this.Bf(c, d)}}return!0; case Yk:g = this.o(a); p = this.o(c); if (!g.M(b) || !p.M(d)){f = g.x; g = g.y; h = p.x; p = p.y; m = (h - f) * (h - f) + (p - g) * (p - g); k = b.x; n = b.y; var l = d.x, q = d.y, r = 0, s = 1, r = 0 !== l - k?(q - n) / (l - k):9E9; 0 !== r && (s = Math.sqrt(1 + 1 / (r * r))); this.Bf(a, b); for (a += 1; a < c; a++){b = this.o(a); var u = b.x, v = b.y, D = 0.5; 0 !== m && (D = ((f - u) * (f -
                h) + (g - v) * (g - p)) / m); var A = f + D * (h - f), G = g + D * (p - g); b = Math.sqrt((u - A) * (u - A) + (v - G) * (v - G)); v < r * (u - A) + G && (b = - b); 0 < r && (b = - b); u = k + D * (l - k); D = n + D * (q - n); 0 !== r?(b = u + b / s, this.Y(a, b, D - (b - u) / r)):this.Y(a, u, D + b)}this.Bf(c, d)}return!0; case Wk:return this.ic && (f = this.o(a), g = this.o(a + 1), h = this.o(a + 2), H.I(f.y, g.y)?H.I(g.x, h.x)?this.Y(a + 1, g.x, b.y):H.I(g.y, h.y) && this.Y(a + 1, b.x, g.y):H.I(f.x, g.x) && (H.I(g.y, h.y)?this.Y(a + 1, b.x, g.y):H.I(g.x, h.x) && this.Y(a + 1, g.x, b.y)), f = this.o(c), g = this.o(c - 1), h = this.o(c - 2), H.I(f.y, g.y)?H.I(g.x,
                h.x)?this.Y(c - 1, g.x, d.y):H.I(g.y, h.y) && this.Y(c - 1, d.x, g.y):H.I(f.x, g.x) && (H.I(g.y, h.y)?this.Y(c - 1, d.x, g.y):H.I(g.x, h.x) && this.Y(c - 1, g.x, d.y))), this.Bf(a, b), this.Bf(c, d), !0; default:return!1}};
        V.prototype.addOrthoPoints = function(a, b, c, d, f, g){b = - 45 <= b && 45 > b?0:45 <= b && 135 > b?90:135 <= b && 225 > b?180:270; d = - 45 <= d && 45 > d?0:45 <= d && 135 > d?90:135 <= d && 225 > d?180:270; var h = f.pa.copy(), k = g.pa.copy(); if (h.N() && k.N()){h.Pf(8, 8); k.Pf(8, 8); h.jj(a); k.jj(c); var l, m; if (0 === b)if (c.x > a.x || 270 === d && c.y < a.y && k.right > a.x || 90 === d && c.y > a.y && k.right > a.x)l = new w(c.x, a.y), m = new w(c.x, (a.y + c.y) / 2), 180 === d?(l.x = this.computeMidOrthoPosition(a.x, c.x, !1), m.x = l.x, m.y = c.y):270 === d && c.y < a.y || 90 === d && c.y > a.y?(l.x = a.x < k.left?this.computeMidOrthoPosition(a.x,
                k.left, !1):a.x < k.right && (270 === d && a.y < k.top || 90 === d && a.y > k.bottom)?this.computeMidOrthoPosition(a.x, c.x, !1):k.right, m.x = l.x, m.y = c.y):0 === d && a.x < k.left && a.y > k.top && a.y < k.bottom && (l.x = a.x, l.y = a.y < c.y?Math.min(c.y, k.top):Math.max(c.y, k.bottom), m.y = l.y); else{l = new w(a.x, c.y); m = new w((a.x + c.x) / 2, c.y); if (180 === d || 90 === d && c.y < h.top || 270 === d && c.y > h.bottom)180 === d && (k.Ga(a) || h.Ga(c))?l.y = this.computeMidOrthoPosition(a.y, c.y, !0):c.y < a.y && (180 === d || 90 === d)?l.y = this.computeMidOrthoPosition(h.top, Math.max(c.y,
                k.bottom), !0):c.y > a.y && (180 === d || 270 === d) && (l.y = this.computeMidOrthoPosition(h.bottom, Math.min(c.y, k.top), !0)), m.x = c.x, m.y = l.y; if (l.y > h.top && l.y < h.bottom)if (c.x >= h.left && c.x <= a.x || a.x <= k.right && a.x >= c.x){if (90 === d || 270 === d)l = new w(Math.max((a.x + c.x) / 2, a.x), a.y), m = new w(l.x, c.y)} else l.y = 270 === d || (0 === d || 180 === d) && c.y < a.y?Math.min(c.y, 0 === d?h.top:Math.min(h.top, k.top)):Math.max(c.y, 0 === d?h.bottom:Math.max(h.bottom, k.bottom)), m.x = c.x, m.y = l.y} else if (180 === b)if (c.x < a.x || 270 === d && c.y < a.y && k.left < a.x ||
                90 === d && c.y > a.y && k.left < a.x)l = new w(c.x, a.y), m = new w(c.x, (a.y + c.y) / 2), 0 === d?(l.x = this.computeMidOrthoPosition(a.x, c.x, !1), m.x = l.x, m.y = c.y):270 === d && c.y < a.y || 90 === d && c.y > a.y?(l.x = a.x > k.right?this.computeMidOrthoPosition(a.x, k.right, !1):a.x > k.left && (270 === d && a.y < k.top || 90 === d && a.y > k.bottom)?this.computeMidOrthoPosition(a.x, c.x, !1):k.left, m.x = l.x, m.y = c.y):180 === d && a.x > k.right && a.y > k.top && a.y < k.bottom && (l.x = a.x, l.y = a.y < c.y?Math.min(c.y, k.top):Math.max(c.y, k.bottom), m.y = l.y); else{l = new w(a.x, c.y); m = new w((a.x +
                c.x) / 2, c.y); if (0 === d || 90 === d && c.y < h.top || 270 === d && c.y > h.bottom)0 === d && (k.Ga(a) || h.Ga(c))?l.y = this.computeMidOrthoPosition(a.y, c.y, !0):c.y < a.y && (0 === d || 90 === d)?l.y = this.computeMidOrthoPosition(h.top, Math.max(c.y, k.bottom), !0):c.y > a.y && (0 === d || 270 === d) && (l.y = this.computeMidOrthoPosition(h.bottom, Math.min(c.y, k.top), !0)), m.x = c.x, m.y = l.y; if (l.y > h.top && l.y < h.bottom)if (c.x <= h.right && c.x >= a.x || a.x >= k.left && a.x <= c.x){if (90 === d || 270 === d)l = new w(Math.min((a.x + c.x) / 2, a.x), a.y), m = new w(l.x, c.y)} else l.y = 270 ===
                d || (0 === d || 180 === d) && c.y < a.y?Math.min(c.y, 180 === d?h.top:Math.min(h.top, k.top)):Math.max(c.y, 180 === d?h.bottom:Math.max(h.bottom, k.bottom)), m.x = c.x, m.y = l.y} else if (90 === b)if (c.y > a.y || 180 === d && c.x < a.x && k.bottom > a.y || 0 === d && c.x > a.x && k.bottom > a.y)l = new w(a.x, c.y), m = new w((a.x + c.x) / 2, c.y), 270 === d?(l.y = this.computeMidOrthoPosition(a.y, c.y, !0), m.x = c.x, m.y = l.y):180 === d && c.x < a.x || 0 === d && c.x > a.x?(l.y = a.y < k.top?this.computeMidOrthoPosition(a.y, k.top, !0):a.y < k.bottom && (180 === d && a.x < k.left || 0 === d && a.x > k.right)?
                this.computeMidOrthoPosition(a.y, c.y, !0):k.bottom, m.x = c.x, m.y = l.y):90 === d && a.y < k.top && a.x > k.left && a.x < k.right && (l.x = a.x < c.x?Math.min(c.x, k.left):Math.max(c.x, k.right), l.y = a.y, m.x = l.x); else{l = new w(c.x, a.y); m = new w(c.x, (a.y + c.y) / 2); if (270 === d || 0 === d && c.x < h.left || 180 === d && c.x > h.right)270 === d && (k.Ga(a) || h.Ga(c))?l.x = this.computeMidOrthoPosition(a.x, c.x, !1):c.x < a.x && (270 === d || 0 === d)?l.x = this.computeMidOrthoPosition(h.left, Math.max(c.x, k.right), !1):c.x > a.x && (270 === d || 180 === d) && (l.x = this.computeMidOrthoPosition(h.right,
                Math.min(c.x, k.left), !1)), m.x = l.x, m.y = c.y; if (l.x > h.left && l.x < h.right)if (c.y >= h.top && c.y <= a.y || a.y <= k.bottom && a.y >= c.y){if (0 === d || 180 === d)l = new w(a.x, Math.max((a.y + c.y) / 2, a.y)), m = new w(c.x, l.y)} else l.x = 180 === d || (90 === d || 270 === d) && c.x < a.x?Math.min(c.x, 90 === d?h.left:Math.min(h.left, k.left)):Math.max(c.x, 90 === d?h.right:Math.max(h.right, k.right)), m.x = l.x, m.y = c.y} else if (c.y < a.y || 180 === d && c.x < a.x && k.top < a.y || 0 === d && c.x > a.x && k.top < a.y)l = new w(a.x, c.y), m = new w((a.x + c.x) / 2, c.y), 90 === d?(l.y = this.computeMidOrthoPosition(a.y,
                c.y, !0), m.x = c.x, m.y = l.y):180 === d && c.x < a.x || 0 === d && c.x >= a.x?(l.y = a.y > k.bottom?this.computeMidOrthoPosition(a.y, k.bottom, !0):a.y > k.top && (180 === d && a.x < k.left || 0 === d && a.x > k.right)?this.computeMidOrthoPosition(a.y, c.y, !0):k.top, m.x = c.x, m.y = l.y):270 === d && a.y > k.bottom && a.x > k.left && a.x < k.right && (l.x = a.x < c.x?Math.min(c.x, k.left):Math.max(c.x, k.right), l.y = a.y, m.x = l.x); else{l = new w(c.x, a.y); m = new w(c.x, (a.y + c.y) / 2); if (90 === d || 0 === d && c.x < h.left || 180 === d && c.x > h.right)90 === d && (k.Ga(a) || h.Ga(c))?l.x = this.computeMidOrthoPosition(a.x,
                c.x, !1):c.x < a.x && (90 === d || 0 === d)?l.x = this.computeMidOrthoPosition(h.left, Math.max(c.x, k.right), !1):c.x > a.x && (90 === d || 180 === d) && (l.x = this.computeMidOrthoPosition(h.right, Math.min(c.x, k.left), !1)), m.x = l.x, m.y = c.y; if (l.x > h.left && l.x < h.right)if (c.y <= h.bottom && c.y >= a.y || a.y >= k.top && a.y <= c.y){if (0 === d || 180 === d)l = new w(a.x, Math.min((a.y + c.y) / 2, a.y)), m = new w(c.x, l.y)} else l.x = 180 === d || (90 === d || 270 === d) && c.x < a.x?Math.min(c.x, 270 === d?h.left:Math.min(h.left, k.left)):Math.max(c.x, 270 === d?h.right:Math.max(h.right,
                k.right)), m.x = l.x, m.y = c.y}var n = l, p = m; if (this.cj){var q = this.h, r; (r = null === q) || (q.Zb.vg?r = !1:(r = q.Ua, r = r instanceof df?!r.ts || r.$E:!0), r = !r); if (r || h.Ga(c) || k.Ga(a) || f === g || this.layer.yc)a = !1; else if (f = Nj(q, this), on(f, Math.min(a.x, n.x), Math.min(a.y, n.y), Math.abs(a.x - n.x), Math.abs(a.y - n.y)) && on(f, Math.min(n.x, p.x), Math.min(n.y, p.y), Math.abs(n.x - p.x), Math.abs(n.y - p.y)) && on(f, Math.min(p.x, c.x), Math.min(p.y, c.y), Math.abs(p.x - c.x), Math.abs(p.y - c.y)))a = !1; else if (h = h.copy().kj(k), h.Pf(2 * f.Em, 2 * f.Dm), pn(f,
                a, b, c, d, h), k = qn(f, c.x, c.y), f.abort || k !== rn || (Qj(f), k = f.pG, h.Pf(f.Em * k, f.Dm * k), pn(f, a, b, c, d, h), k = qn(f, c.x, c.y)), f.abort || k !== rn || (Qj(f), k = f.jF, h.Pf(f.Em * k, f.Dm * k), pn(f, a, b, c, d, h), k = qn(f, c.x, c.y)), !f.abort && k === rn && f.VG && (Qj(f), pn(f, a, b, c, d, f.Ob), k = qn(f, c.x, c.y)), !f.abort && k < rn && 0 !== qn(f, c.x, c.y)){sn(this, f, c.x, c.y, d, !0); d = this.o(2); if (4 > this.oa)0 === b || 180 === b?(d.x = a.x, d.y = c.y):(d.x = c.x, d.y = a.y), this.Y(2, d.x, d.y), this.C(3, d.x, d.y); else if (c = this.o(3), 0 === b || 180 === b)H.I(d.x, c.x)?(b = 0 === b?Math.max(d.x,
                a.x):Math.min(d.x, a.x), this.Y(2, b, a.y), this.Y(3, b, c.y)):H.I(d.y, c.y)?(Math.abs(a.y - d.y) <= f.Dm / 2 && (this.Y(2, d.x, a.y), this.Y(3, c.x, a.y)), this.C(2, d.x, a.y)):this.Y(2, a.x, d.y); else if (90 === b || 270 === b)H.I(d.y, c.y)?(b = 90 === b?Math.max(d.y, a.y):Math.min(d.y, a.y), this.Y(2, a.x, b), this.Y(3, c.x, b)):H.I(d.x, c.x)?(Math.abs(a.x - d.x) <= f.Em / 2 && (this.Y(2, a.x, d.y), this.Y(3, a.x, c.y)), this.C(2, a.x, d.y)):this.Y(2, d.x, a.y); a = !0} else a = !1} else a = !1; a || (this.Vh(l), this.Vh(m))}};
        V.prototype.computeMidOrthoPosition = function(a, b){if (this.hasCurviness()){var c = this.computeCurviness(); return(a + b) / 2 + c}return(a + b) / 2}; function Cf(a){if (!a.cj)return!1; var b = a.points.n, c = b.length; if (4 > c)return!1; a = Nj(a.h, a); for (var d = 1; d < c - 2; d++){var f = b[d], g = b[d + 1]; if (!on(a, Math.min(f.x, g.x), Math.min(f.y, g.y), Math.abs(f.x - g.x), Math.abs(f.y - g.y)))return!0}return!1}
function sn(a, b, c, d, f, g){var h = b.Em, k = b.Dm, l = qn(b, c, d), m = c, n = d; for (0 === f?m += h:90 === f?n += k:180 === f?m -= h:n -= k; l > tn && qn(b, m, n) === l - un; )c = m, d = n, 0 === f?m += h:90 === f?n += k:180 === f?m -= h:n -= k, l -= un; if (g){if (l > tn)if (180 === f || 0 === f)c = Math.floor(c / h) * h + h / 2; else if (90 === f || 270 === f)d = Math.floor(d / k) * k + k / 2} else c = Math.floor(c / h) * h + h / 2, d = Math.floor(d / k) * k + k / 2; l > tn && (g = f, m = c, n = d, 0 === f?(g = 90, n += k):90 === f?(g = 180, m -= h):180 === f?(g = 270, n -= k):270 === f && (g = 0, m += h), qn(b, m, n) === l - un?sn(a, b, m, n, g, !1):(m = c, n = d, 0 === f?(g = 270, n -=
        k):90 === f?(g = 0, m += h):180 === f?(g = 90, n += k):270 === f && (g = 180, m -= h), qn(b, m, n) === l - un && sn(a, b, m, n, g, !1))); a.Wk(c, d)}V.prototype.findClosestSegment = function(a){e && t.l(a, w, V, "findClosestSegment:p"); var b = a.x; a = a.y; for (var c = this.o(0), d = this.o(1), f = Ra(b, a, c.x, c.y, d.x, d.y), g = 0, h = 1; h < this.oa - 1; h++){var c = this.o(h + 1), k = Ra(b, a, d.x, d.y, c.x, c.y), d = c; k < f && (g = h, f = k)}return g}; V.prototype.invalidateGeometry = V.prototype.Ye = function(){this.Ii = this.Oa = null; this.fa()};
        t.A(V, {nd:"geometry"}, function(){null === this.Oa && (this.updateRoute(), this.Oa = this.makeGeometry()); return this.Oa}); V.prototype.Yw = function(){if (null === this.Oa && !1 !== this.og){this.Oa = this.makeGeometry(); var a = this.Qq(); if (null !== a){a.Oa = this.Oa; for (var b = this.xa, c = b.length, d = 0; d < c; d++){var f = b.n[d]; f !== a && f.ej && f instanceof W && (f.Oa = this.Oa)}}}};
        V.prototype.makeGeometry = function(){var a = this.oa; if (2 > a){var b = new zc(Ac), c = new Bc(0, 0); b.Ab.add(c); return b}var d = !1, b = this.h; null !== b && 0 !== b.ja.Je && cn(this) && (d = !0); var f = this.o(0).copy(), g = f.copy(), h = this.computeCurve(); if (h === Pg && 3 <= a && !H.nb(this.ln, 0))if (3 === a)var k = this.o(1), b = Math.min(f.x, k.x), c = Math.min(f.y, k.y), k = this.o(2), b = Math.min(b, k.x), c = Math.min(c, k.y); else{if (this.ic)for (k = 0; k < a; k++)b = this.Cc.n[k], g.x = Math.min(b.x, g.x), g.y = Math.min(b.y, g.y); else for (var l, k = 3; k < a; k += 3)k + 3 >= a && (k =
                a - 1), l = this.o(k), g.x = Math.min(l.x, g.x), g.y = Math.min(l.y, g.y); b = g.x; c = g.y} else{for (k = 0; k < a; k++)b = this.Cc.n[k], g.x = Math.min(b.x, g.x), g.y = Math.min(b.y, g.y); b = g.x; c = g.y}b -= this.yz.x; c -= this.yz.y; f.x -= b; f.y -= c; if (2 === a){var m = this.o(1).copy(); m.x -= b; m.y -= c; 0 !== mn(this) && vn(this, f, !0, g); 0 !== nn(this) && vn(this, m, !1, g); b = new zc(Dc); b.qa = f.x; b.ra = f.y; b.D = m.x; b.F = m.y} else{m = t.u(); 0 !== mn(this) && vn(this, f, !0, g); J(m, f.x, f.y, !1, !1); if (h === Pg && 3 <= a && !H.nb(this.ln, 0))if (3 === a)k = this.o(1), a = k.x - b, d = k.y - c, k = this.o(2).copy(),
                k.x -= b, k.y -= c, 0 !== nn(this) && vn(this, k, !1, g), K(m, a, d, a, d, k.x, k.y); else if (this.ic){g = new w(b, c); f = this.o(1).copy(); h = new w(b, c); a = new w(b, c); d = this.o(0); l = null; for (var n = this.ln / 3, k = 1; k < this.oa - 1; k++){l = this.o(k); var p = d, q = l, r = this.o(wn(this, l, k, !1)); if (!H.nb(p.x, q.x) || !H.nb(q.x, r.x))if (!H.nb(p.y, q.y) || !H.nb(q.y, r.y)){var s = n, u = h, v = a; isNaN(s) && (s = this.ln / 3); var D = p.x, p = p.y, A = q.x, q = q.y, G = r.x, r = r.y, L = s * xn(D, p, A, q), s = s * xn(A, q, G, r); H.nb(p, q) && H.nb(A, G) && (A > D?r > q?(u.x = A - L, u.y = q - L, v.x = A + s, v.y = q + s):(u.x =
                A - L, u.y = q + L, v.x = A + s, v.y = q - s):r > q?(u.x = A + L, u.y = q - L, v.x = A - s, v.y = q + s):(u.x = A + L, u.y = q + L, v.x = A - s, v.y = q - s)); H.nb(D, A) && H.nb(q, r) && (q > p?(G > A?(u.x = A - L, u.y = q - L, v.x = A + s):(u.x = A + L, u.y = q - L, v.x = A - s), v.y = q + s):(G > A?(u.x = A - L, u.y = q + L, v.x = A + s):(u.x = A + L, u.y = q + L, v.x = A - s), v.y = q - s)); if (H.nb(D, A) && H.nb(A, G) || H.nb(p, q) && H.nb(q, r))D = 0.5 * (D + G), p = 0.5 * (p + r), u.x = D, u.y = p, v.x = D, v.y = p; 1 === k?(f.x = 0.5 * (d.x + l.x), f.y = 0.5 * (d.y + l.y)):2 === k && H.nb(d.x, this.o(0).x) && H.nb(d.y, this.o(0).y) && (f.x = 0.5 * (d.x + l.x), f.y = 0.5 * (d.y + l.y)); K(m, f.x - b,
                f.y - c, h.x - b, h.y - c, l.x - b, l.y - c); g.set(h); f.set(a); d = l}}k = d.x; d = d.y; g = this.o(this.oa - 1); k = 0.5 * (k + g.x); d = 0.5 * (d + g.y); K(m, a.x - b, a.y - c, k - b, d - c, g.x - b, g.y - c)} else for (k = 3; k < a; k += 3)d = this.o(k - 2), k + 3 >= a && (k = a - 1), g = this.o(k - 1), l = this.o(k), k === a - 1 && 0 !== nn(this) && (l = l.copy(), vn(this, l, !1, H.mj)), K(m, d.x - b, d.y - c, g.x - b, g.y - c, l.x - b, l.y - c); else{g = t.K(); g.assign(this.o(0)); for (k = 1; k < a; ){k = wn(this, g, k, 1 < k); u = this.o(k); if (k >= a - 1){g !== u && (0 !== nn(this) && (u = u.copy(), vn(this, u, !1, H.mj)), yn(this, m, - b, - c, g, u, d)); break}k = wn(this,
                u, k + 1, k < a - 3); f = m; h = - b; l = - c; n = g; v = this.o(k); D = g; p = d; H.I(n.y, u.y) && H.I(u.x, v.x)?(s = this.computeCorner(), s = Math.min(s, Math.abs(u.x - n.x) / 2), s = A = Math.min(s, Math.abs(v.y - u.y) / 2), H.I(s, 0)?(yn(this, f, h, l, n, u, p), D.assign(u)):(q = u.x, G = u.y, r = q, L = G, q = u.x > n.x?u.x - s:u.x + s, L = v.y > u.y?u.y + A:u.y - A, yn(this, f, h, l, n, new w(q, G), p), Sc(f, u.x + h, u.y + l, r + h, L + l), D.p(r, L))):H.I(n.x, u.x) && H.I(u.y, v.y)?(s = this.computeCorner(), A = Math.min(s, Math.abs(u.y - n.y) / 2), A = s = Math.min(A, Math.abs(v.x - u.x) / 2), H.I(s, 0)?(yn(this, f, h, l, n, u, p), D.assign(u)):
                (q = u.x, L = G = u.y, G = u.y > n.y?u.y - A:u.y + A, r = v.x > u.x?u.x + s:u.x - s, yn(this, f, h, l, n, new w(q, G), p), Sc(f, u.x + h, u.y + l, r + h, L + l), D.p(r, L))):(yn(this, f, h, l, n, u, p), D.assign(u))}t.B(g)}b = m.s; t.v(m)}return b}; function xn(a, b, c, d){a = c - a; if (isNaN(a) || Infinity === a || - Infinity === a)return NaN; 0 > a && (a = - a); b = d - b; if (isNaN(b) || Infinity === b || - Infinity === b)return NaN; 0 > b && (b = - b); return H.nb(a, 0)?b:H.nb(b, 0)?a:Math.sqrt(a * a + b * b)}
function vn(a, b, c, d){var f = a.oa; if (!(2 > f))if (c){var g = a.o(1); c = g.x - d.x; d = g.y - d.y; g = xn(b.x, b.y, c, d); 0 !== g && (f = 2 === f?0.5 * g:g, a = mn(a), a > f && (a = f), c = a * (c - b.x) / g, a = a * (d - b.y) / g, b.x += c, b.y += a)} else g = a.o(f - 2), c = g.x - d.x, d = g.y - d.y, g = xn(b.x, b.y, c, d), 0 !== g && (f = 2 === f?0.5 * g:g, a = nn(a), a > f && (a = f), c = a * (b.x - c) / g, a = a * (b.y - d) / g, b.x -= c, b.y -= a)}
function wn(a, b, c, d){for (var f = a.oa, g = b; H.nb(b.x, g.x) && H.nb(b.y, g.y); ){if (c >= f)return f - 1; g = a.o(c++)}if (!H.nb(b.x, g.x) && !H.nb(b.y, g.y))return c - 1; for (var h = g; H.nb(b.x, g.x) && H.nb(g.x, h.x) && (!d || (b.y >= g.y?g.y >= h.y:g.y <= h.y)) || H.nb(b.y, g.y) && H.nb(g.y, h.y) && (!d || (b.x >= g.x?g.x >= h.x:g.x <= h.x)); ){if (c >= f)return f - 1; h = a.o(c++)}return c - 2}
function yn(a, b, c, d, f, g, h){if (!h && cn(a)){h = []; var k = 0; a.Sa() && (k = zn(a, f, g, h)); var l = f.x, l = f.y; if (0 < k)if (H.I(f.y, g.y))if (f.x < g.x)for (var m = 0; m < k; ){var n = Math.max(f.x, Math.min(h[m++] - 5, g.x - 10)); b.lineTo(n + c, g.y + d); for (var l = n + c, p = Math.min(n + 10, g.x); m < k; ){var q = h[m]; if (q < p + 10)m++, p = Math.min(q + 5, g.x); else break}q = (n + p) / 2 + c; q = g.y - 10 + d; n = p + c; p = g.y + d; a.De === yg?J(b, n, p, !1, !1):K(b, l, q, n, q, n, p)} else for (m = k - 1; 0 <= m; ){n = Math.min(f.x, Math.max(h[m--] + 5, g.x + 10)); b.lineTo(n + c, g.y + d); l = n + c; for (p = Math.max(n - 10, g.x); 0 <=
        m; )if (q = h[m], q > p - 10)m--, p = Math.max(q - 5, g.x); else break; q = g.y - 10 + d; n = p + c; p = g.y + d; a.De === yg?J(b, n, p, !1, !1):K(b, l, q, n, q, n, p)} else if (H.I(f.x, g.x))if (f.y < g.y)for (m = 0; m < k; ){n = Math.max(f.y, Math.min(h[m++] - 5, g.y - 10)); b.lineTo(g.x + c, n + d); l = n + d; for (p = Math.min(n + 10, g.y); m < k; )if (q = h[m], q < p + 10)m++, p = Math.min(q + 5, g.y); else break; q = g.x - 10 + c; n = g.x + c; p += d; a.De === yg?J(b, n, p, !1, !1):K(b, q, l, q, p, n, p)} else for (m = k - 1; 0 <= m; ){n = Math.min(f.y, Math.max(h[m--] + 5, g.y + 10)); b.lineTo(g.x + c, n + d); l = n + d; for (p = Math.max(n - 10, g.y); 0 <=
        m; )if (q = h[m], q > p - 10)m--, p = Math.max(q - 5, g.y); else break; q = g.x - 10 + c; n = g.x + c; p += d; a.De === yg?J(b, n, p, !1, !1):K(b, q, l, q, p, n, p)}}b.lineTo(g.x + c, g.y + d)}
function zn(a, b, c, d){var f = a.h; if (null === f || b.M(c))return 0; for (f = f.Uw; f.next(); ){var g = f.value; if (null !== g && g.visible)for (var g = g.Fb.n, h = g.length, k = 0; k < h; k++){var l = g[k]; if (l === a)return 0 < d.length && d.sort(function(a, b){return a - b}), d.length; if (l instanceof V && l.Sa() && cn(l)){var m = l.uj(); m.N() && a.uj().Qf(m) && !a.usesSamePort(l) && (m = l.path, null !== m && m.ol() && An(b, c, d, l))}}}0 < d.length && d.sort(function(a, b){return a - b}); return d.length}
function An(a, b, c, d){for (var f = H.I(a.y, b.y), g = d.oa, h = d.o(0), k = t.K(), l = 1; l < g; l++){var m = d.o(l); if (l < g - 1){var n = d.o(l + 1); if (h.y === m.y && m.y === n.y){if (m.x > h.x && n.x > m.x || m.x < h.x && n.x < m.x)m = n, l++} else h.x === m.x && m.x === n.x && (m.y > h.y && n.y > m.y || m.y < h.y && n.y < m.y) && (m = n, l++)}a:{var n = k, p = a.x, q = a.y, r = b.x, s = b.y, u = h.x, h = h.y, v = m.x, D = m.y; if (!H.I(p, r)){if (H.I(q, s) && H.I(u, v) && Math.min(p, r) < u && Math.max(p, r) > u && Math.min(h, D) < q && Math.max(h, D) > q && !H.I(h, D)){n.x = u; n.y = q; n = !0; break a}} else if (!H.I(q, s) && H.I(h, D) && Math.min(q,
        s) < h && Math.max(q, s) > h && Math.min(u, v) < p && Math.max(u, v) > p && !H.I(u, v)){n.x = p; n.y = h; n = !0; break a}n.x = 0; n.y = 0; n = !1}n && (f?c.push(k.x):c.push(k.y)); h = m}t.B(k)}t.A(V, {ft:"firstPickIndex"}, function(){return 2 >= this.oa?0:this.ic || fn(this) !== wb?1:0}); t.A(V, {Sw:"lastPickIndex"}, function(){var a = this.oa; return 0 === a?0:2 >= a?a - 1:this.ic || gn(this) !== wb?a - 2:a - 1}); function cn(a){a = a.De; return a === xg || a === yg}function en(a, b){if (b || cn(a)){var c = a.h; null === c || c.Mn.contains(a) || null === a.mz || c.Mn.add(a, a.mz)}}
function Ag(a, b){var c = a.layer; if (null !== c && c.visible && !c.yc){var d = c.h; if (null !== d)for (var f = !1, d = d.Uw; d.next(); ){var g = d.value; if (g.visible)if (g === c)for (var f = !0, h = !1, g = g.Fb.n, k = g.length, l = 0; l < k; l++){var m = g[l]; m instanceof V && (m === a?h = !0:h && Bn(a, m, b))} else if (f)for (g = g.Fb.n, k = g.length, l = 0; l < k; l++)m = g[l], m instanceof V && Bn(a, m, b)}}}function Bn(a, b, c){if (null !== b && cn(b) && null !== b.Oa){var d = b.uj(); d.N() && (a.uj().Qf(d) || c.Qf(d)) && (a.usesSamePort(b) || b.Ye())}}
V.prototype.usesSamePort = function(a){var b = this.oa, c = a.oa; if (0 < b && 0 < c){if (this.o(0).sf(a.o(0)) || this.o(b - 1).sf(a.o(c - 1)))return!0} else if (this.aa === a.aa || this.ca === a.ca)return!0; return!1}; V.prototype.gh = function(a){E.prototype.gh.call(this, a); a && this.updateRoute(); if (null !== this.we)for (var b = this.we.k; b.next(); )b.value.gh(a)}; t.g(V, "adjusting", V.prototype.Lo);
        t.defineProperty(V, {Lo:"adjusting"}, function(){return this.kq}, function(a){var b = this.kq; b !== a && (e && t.Aa(a, V, V, "adjusting"), this.kq = a, this.j("adjusting", b, a))}); t.g(V, "corner", V.prototype.ow); t.defineProperty(V, {ow:"corner"}, function(){return this.xq}, function(a){var b = this.xq; b !== a && (e && t.i(a, "number", V, "corner"), this.xq = a, this.Ye(), this.j("corner", b, a))}); t.g(V, "curve", V.prototype.De);
        t.defineProperty(V, {De:"curve"}, function(){return this.Aq}, function(a){var b = this.Aq; b !== a && (e && t.Aa(a, V, V, "curve"), this.Aq = a, this.ac(), en(this, b === yg || b === xg || a === yg || a === xg), this.j("curve", b, a))}); t.g(V, "curviness", V.prototype.Ws); t.defineProperty(V, {Ws:"curviness"}, function(){return this.Bq}, function(a){var b = this.Bq; b !== a && (e && t.i(a, "number", V, "curviness"), this.Bq = a, this.ac(), this.j("curviness", b, a))}); t.g(V, "routing", V.prototype.Jt);
        t.defineProperty(V, {Jt:"routing"}, function(){return this.mm}, function(a){var b = this.mm; b !== a && (e && t.Aa(a, V, V, "routing"), this.mm = a, this.ui = null, this.ac(), en(this, 2 === (b.value & 2) || 2 === (a.value & 2)), this.j("routing", b, a))}); t.g(V, "smoothness", V.prototype.ln); t.defineProperty(V, {ln:"smoothness"}, function(){return this.os}, function(a){var b = this.os; b !== a && (e && t.i(a, "number", V, "smoothness"), this.os = a, this.Ye(), this.j("smoothness", b, a))});
        function an(a){var b = a.bg; if (null !== b){var c = a.ng; if (null !== c){var d = a.Bh, f = a.Rh; a:{if (null !== c && null !== b.qh)for (a = b.qh.k; a.next(); ){var g = a.value; if (g.Gp === b && g.zt === c && g.bx === d && g.ex === f || g.Gp === c && g.zt === b && g.bx === f && g.ex === d){a = g; break a}}a = null}for (var h = g = null, k = b.mc.n, l = k.length, m = 0; m < l; m++){var n = k[m]; if (n.bg === b && n.Bh === d && n.ng === c && n.Rh === f || n.bg === c && n.Bh === f && n.ng === b && n.Rh === d)null === h?h = n:(null === g && (g = new B(V), g.add(h)), g.add(n))}if (null !== g)for (null === a && (a = new Km, a.Gp = b, a.bx = d, a.zt =
                c, a.ex = f, Jm(b, a), Jm(c, a)), a.links = g, m = 0; m < g.count; m++)if (n = g.n[m], 0 === n.gf){b = 1; for (c = 0; c < g.count; c++)Math.abs(g.n[c].gf) === b && (b++, c = - 1); n.xn = a; n.gf = n.aa === a.Gp?b: - b; b = n.h; (null === b || b.kf) && n.ac()}}}}
function $m(a){var b = a.xn; if (null !== b){var c = a.gf; a.xn = null; a.gf = 0; b.links.remove(a); if (2 > b.links.count)1 === b.links.count && (c = b.links.n[0], c.xn = null, c.gf = 0, c.ac()), c = b.Gp, null !== b && null !== c.qh && c.qh.remove(b), c = b.zt, null !== b && null !== c.qh && c.qh.remove(b); else for (c = Math.abs(c), a = 0 === c % 2, b = b.links.k; b.next(); ){var d = b.value, f = Math.abs(d.gf), g = 0 === f % 2; f > c && a === g && (d.gf = 0 < d.gf?d.gf - 2:d.gf + 2, d.ac())}}}function Km(){t.Ac(this); this.links = this.ex = this.zt = this.bx = this.Gp = null}
t.Td(Km, {Gp:!0, bx:!0, zt:!0, ex:!0, links:!0, spacing:!0}); function Oj(){t.Ac(this); this.group = null; this.mt = !0; this.abort = !1; this.hg = this.gg = 1; this.ur = this.tr = - 1; this.he = this.ge = 8; this.vc = null; this.VG = !1; this.pG = 22; this.jF = 111}t.Td(Oj, {group:!0, mt:!0, abort:!0, VG:!0, pG:!0, jF:!0}); var tn = 1, un = 1, rn = 999999999, Cn = rn;
        Oj.prototype.initialize = function(a){if (!(0 >= a.width || 0 >= a.height)){var b = a.y, c = a.x + a.width, d = a.y + a.height; this.gg = Math.floor((a.x - this.ge) / this.ge) * this.ge; this.hg = Math.floor((b - this.he) / this.he) * this.he; this.tr = Math.ceil((c + 2 * this.ge) / this.ge) * this.ge; this.ur = Math.ceil((d + 2 * this.he) / this.he) * this.he; a = 1 + (Math.ceil((this.tr - this.gg) / this.ge) | 0); b = 1 + (Math.ceil((this.ur - this.hg) / this.he) | 0); if (null === this.vc || this.Go < a - 1 || this.Ho < b - 1){c = []; for (d = 0; d <= a; d++){for (var f = [], g = 0; g <= b; g++)f[g] = 0; c[d] = f}this.vc =
                c; this.Go = a - 1; this.Ho = b - 1}if (null !== this.vc)for (a = 0; a <= this.Go; a++)for (b = 0; b <= this.Ho; b++)this.vc[a][b] = Cn}}; t.A(Oj, {Ob:null}, function(){return new x(this.gg, this.hg, this.tr - this.gg, this.ur - this.hg)}); t.g(Oj, "cellWidth", Oj.prototype.Em); t.defineProperty(Oj, {Em:null}, function(){return this.ge}, function(a){0 < a && a !== this.ge && (this.ge = a, this.initialize(this.Ob))}); t.g(Oj, "cellHeight", Oj.prototype.Dm); t.defineProperty(Oj, {Dm:null}, function(){return this.he}, function(a){0 < a && a !== this.he && (this.he = a, this.initialize(this.Ob))});
        function Dn(a, b, c){return a.gg <= b && b <= a.tr && a.hg <= c && c <= a.ur}function qn(a, b, c){if (!Dn(a, b, c))return 0; b -= a.gg; b /= a.ge; c -= a.hg; c /= a.he; return a.vc[b | 0][c | 0]}function Rj(a, b, c){Dn(a, b, c) && (b -= a.gg, b /= a.ge, c -= a.hg, c /= a.he, a.vc[b | 0][c | 0] = 0)}function Qj(a){if (null !== a.vc)for (var b = 0; b <= a.Go; b++)for (var c = 0; c <= a.Ho; c++)a.vc[b][c] >= tn && (a.vc[b][c] |= rn)}
function on(a, b, c, d, f){if (b > a.tr || b + d < a.gg || c > a.ur || c + f < a.hg)return!0; b = (b - a.gg) / a.ge | 0; c = (c - a.hg) / a.he | 0; d = Math.max(0, d) / a.ge + 1 | 0; var g = Math.max(0, f) / a.he + 1 | 0; 0 > b && (d += b, b = 0); 0 > c && (g += c, c = 0); if (0 > d || 0 > g)return!0; f = Math.min(b + d - 1, a.Go) | 0; for (d = Math.min(c + g - 1, a.Ho) | 0; b <= f; b++)for (g = c; g <= d; g++)if (0 === a.vc[b][g])return!1; return!0}
function En(a, b, c, d, f, g, h, k, l){if (!(b < g || b > h || c < k || c > l)){var m, n; m = b | 0; n = c | 0; var p = a.vc[m][n]; if (p >= tn && p < rn)for (f?n += d:m += d, p += un; g <= m && m <= h && k <= n && n <= l && !(p >= a.vc[m][n]); )a.vc[m][n] = p, p += un, f?n += d:m += d; m = f?n:m; if (f)if (0 < d)for (c += d; c < m; c += d)En(a, b, c, 1, !f, g, h, k, l), En(a, b, c, - 1, !f, g, h, k, l); else for (c += d; c > m; c += d)En(a, b, c, 1, !f, g, h, k, l), En(a, b, c, - 1, !f, g, h, k, l); else if (0 < d)for (b += d; b < m; b += d)En(a, b, c, 1, !f, g, h, k, l), En(a, b, c, - 1, !f, g, h, k, l); else for (b += d; b > m; b += d)En(a, b, c, 1, !f, g, h, k, l), En(a, b, c, - 1, !f, g, h,
        k, l)}}function Fn(a, b, c, d, f, g, h, k, l, m, n){for (var p = b | 0, q = c | 0, r = a.vc[p][q]; 0 === r && p > k && p < l && q > m && q < n; )if (h?q += g:p += g, r = a.vc[p][q], 1 >= Math.abs(p - d) && 1 >= Math.abs(q - f))return a.abort = !0, 0; p = b | 0; q = c | 0; r = a.vc[p][q]; b = tn; for (a.vc[p][q] = b; 0 === r && p > k && p < l && q > m && q < n; )h?q += g:p += g, r = a.vc[p][q], a.vc[p][q] = b, b += un; return h?q:p}
function pn(a, b, c, d, f, g){if (null !== a.vc){a.abort = !1; var h = b.x, k = b.y; if (Dn(a, h, k)){var h = h - a.gg, h = h / a.ge, k = k - a.hg, k = k / a.he, l = d.x, m = d.y; if (Dn(a, l, m))if (l -= a.gg, l /= a.ge, m -= a.hg, m /= a.he, 1 >= Math.abs(h - l) && 1 >= Math.abs(k - m))a.abort = !0; else{var n = g.x; b = g.y; d = g.x + g.width; var p = g.y + g.height, n = n - a.gg, n = n / a.ge; b -= a.hg; b /= a.he; d -= a.gg; d /= a.ge; p -= a.hg; p /= a.he; g = Math.max(0, Math.min(a.Go, n | 0)); d = Math.min(a.Go, Math.max(0, d | 0)); b = Math.max(0, Math.min(a.Ho, b | 0)); var p = Math.min(a.Ho, Math.max(0, p | 0)), h = h | 0, k = k | 0, l = l | 0,
        m = m | 0, n = h, q = k, r = 0 === c || 90 === c?1: - 1; (c = 90 === c || 270 === c)?q = Fn(a, h, k, l, m, r, c, g, d, b, p):n = Fn(a, h, k, l, m, r, c, g, d, b, p); if (!a.abort){a:{c = 0 === f || 90 === f?1: - 1; f = 90 === f || 270 === f; for (var r = l | 0, s = m | 0, u = a.vc[r][s]; 0 === u && r > g && r < d && s > b && s < p; )if (f?s += c:r += c, u = a.vc[r][s], 1 >= Math.abs(r - h) && 1 >= Math.abs(s - k)){a.abort = !0; break a}r = l | 0; s = m | 0; u = a.vc[r][s]; for (a.vc[r][s] = Cn; 0 === u && r > g && r < d && s > b && s < p; )f?s += c:r += c, u = a.vc[r][s], a.vc[r][s] = Cn}a.abort || (En(a, n, q, 1, !1, g, d, b, p), En(a, n, q, - 1, !1, g, d, b, p), En(a, n, q, 1, !0, g, d, b, p), En(a,
        n, q, - 1, !0, g, d, b, p))}}}}}function kn(){t.Ac(this); this.port = this.Fc = null; this.Dg = []; this.Fp = !1}t.Td(kn, {Fc:!0, port:!0, Dg:!0, Fp:!0}); kn.prototype.toString = function(){for (var a = this.Dg, b = this.Fc.toString() + " " + a.length.toString() + ":", c = 0; c < a.length; c++){var d = a[c]; null !== d && (b += "\n  " + d.toString())}return b};
        function Gn(a, b, c, d){b = b.offsetY; switch (b){case t.Pc:return 90; case t.Hc:return 180; case t.ad:return 270; case t.Qc:return 0}switch (b){case t.Pc | t.ad:return 180 < c?270:90; case t.Hc | t.Qc:return 90 < c && 270 >= c?180:0}a = 180 * Math.atan2(a.height, a.width) / Math.PI; switch (b){case t.Hc | t.ad:return c > a && c <= 180 + a?180:270; case t.ad | t.Qc:return c > 180 - a && c <= 360 - a?270:0; case t.Qc | t.Pc:return c > a && c <= 180 + a?90:0; case t.Pc | t.Hc:return c > 180 - a && c <= 360 - a?180:90; case t.Hc | t.ad | t.Qc:return 90 < c && c <= 180 + a?180:c > 180 + a && c <= 360 -
                a?270:0; case t.ad | t.Qc | t.Pc:return 180 < c && c <= 360 - a?270:c > a && 180 >= c?90:0; case t.Qc | t.Pc | t.Hc:return c > a && c <= 180 - a?90:c > 180 - a && 270 >= c?180:0; case t.Pc | t.Hc | t.ad:return c > 180 - a && c <= 180 + a?180:c > 180 + a?270:90}d && b !== (t.Hc | t.ad | t.Qc | t.Pc) && (c -= 15, 0 > c && (c += 360)); return c > a && c < 180 - a?90:c >= 180 - a && c <= 180 + a?180:c > 180 + a && c < 360 - a?270:0}
function ln(a, b){var c = a.Dg; if (0 === c.length){a:if (!a.Fp){c = a.Fp; a.Fp = !0; var d, f = null, g = a.Fc; if (g instanceof T && !g.qe){if (!g.pa.N()){a.Fp = c; break a}f = g; d = f.xE()} else d = a.Fc.yE(); var h = a.Dg.length = 0, k = a.port.qb(Eb, t.K()), l = a.port.qb(Pb, t.K()), g = t.hk(k.x, k.y, 0, 0); g.jj(l); t.B(k); t.B(l); k = t.lc(g.x + g.width / 2, g.y + g.height / 2); for (d = d.k; d.next(); )if (l = d.value, l.Sa()){var m = wb, n = l.ud === a.port || l.aa.ml(f), m = n?fn(l, a.port):gn(l, a.port); if (m.qp() && (n = n?l.de:l.ud, null !== n)){var p = n.S; if (null !== p){var n = l.computeOtherPoint(p,
        n), p = k.Zi(n), m = Gn(g, m, p, l.ic), q; 0 === m?(q = t.Qc, 180 < p && (p -= 360)):q = 90 === m?t.Pc:180 === m?t.Hc:t.ad; (m = a.Dg[h])?(m.link = l, m.angle = p, m.$d = q):(m = new Hn(l, p, q), a.Dg[h] = m); m.ax.set(n); h++}}}t.B(k); a.Dg.sort(kn.prototype.oJ); f = a.Dg.length; k = - 1; for (h = d = 0; h < f; h++)m = a.Dg[h], null !== m && (m.$d !== k && (k = m.$d, d = 0), m.lp = d, d++); k = - 1; d = 0; for (h = f - 1; 0 <= h; h--)m = a.Dg[h], null !== m && (m.$d !== k && (k = m.$d, d = m.lp + 1), m.Jm = d); h = a.Dg; n = a.port; f = a.Fc.AJ; k = t.K(); d = t.K(); l = t.K(); m = t.K(); n.qb(Eb, k); n.qb(Gb, d); n.qb(Pb, l); n.qb(Lb, m); var r =
        q = p = n = 0; if (f === Im)for (var s = 0; s < h.length; s++){var u = h[s]; if (null !== u){var v = u.link.computeThickness(); switch (u.$d){case t.Pc:q += v; break; case t.Hc:r += v; break; case t.ad:n += v; break; default:case t.Qc:p += v}}}for (var D = 0, A, G, L = 0, N = G = 0, O = 1, s = 0; s < h.length; s++)if (u = h[s], null !== u){if (D != u.$d){D = u.$d; switch (D){case t.Pc:A = l; G = m; break; case t.Hc:A = m; G = k; break; case t.ad:A = k; G = d; break; default:case t.Qc:A = d, G = l}L = G.x - A.x; G = G.y - A.y; switch (D){case t.Pc:q > Math.abs(L)?(O = Math.abs(L) / q, q = Math.abs(L)):O = 1; break; case t.Hc:r >
        Math.abs(G)?(O = Math.abs(G) / r, r = Math.abs(G)):O = 1; break; case t.ad:n > Math.abs(L)?(O = Math.abs(L) / n, n = Math.abs(L)):O = 1; break; default:case t.Qc:p > Math.abs(G)?(O = Math.abs(G) / p, p = Math.abs(G)):O = 1}N = 0}var U = u.wp; if (f === Im){v = u.link.computeThickness(); v *= O; U.set(A); switch (D){case t.Pc:U.x = A.x + L / 2 + q / 2 - N - v / 2; break; case t.Hc:U.y = A.y + G / 2 + r / 2 - N - v / 2; break; case t.ad:U.x = A.x + L / 2 - n / 2 + N + v / 2; break; default:case t.Qc:U.y = A.y + G / 2 - p / 2 + N + v / 2}N += v} else v = 0.5, f === Fm && (v = (u.lp + 1) / (u.Jm + 1)), U.x = A.x + L * v, U.y = A.y + G * v}t.B(k); t.B(d);
        t.B(l); t.B(m); A = a.Dg; for (h = 0; h < A.length; h++)f = A[h], null !== f && (f.ww = a.computeEndSegmentLength(f)); a.Fp = c; t.hc(g)}c = a.Dg}for (g = 0; g < c.length; g++)if (A = c[g], null !== A && A.link === b)return A; return null}kn.prototype.oJ = function(a, b){return a === b?0:null === a? - 1:null === b?1:a.$d < b.$d? - 1:a.$d > b.$d?1:a.angle < b.angle? - 1:a.angle > b.angle?1:0};
        kn.prototype.computeEndSegmentLength = function(a){var b = a.link, c = b.computeEndSegmentLength(this.Fc, this.port, wb, b.ud === this.port), d = a.lp; if (0 > d)return c; var f = a.Jm; if (1 >= f || !b.ic)return c; var b = a.ax, g = a.wp; if (a.$d === t.Hc || a.$d === t.Pc)d = f - 1 - d; return((a = a.$d === t.Hc || a.$d === t.Qc)?b.y < g.y:b.x < g.x)?c + 8 * d:(a?b.y === g.y:b.x === g.x)?c:c + 8 * (f - 1 - d)}; function Hn(a, b, c){this.link = a; this.angle = b; this.$d = c; this.ax = new w; this.Jm = this.lp = 0; this.wp = new w; this.ww = 0}
t.Td(Hn, {link:!0, angle:!0, $d:!0, ax:!0, lp:!0, Jm:!0, wp:!0, ww:!0}); Hn.prototype.toString = function(){return this.link.toString() + " " + this.angle.toString() + " " + this.$d.toString() + ":" + this.lp.toString() + "/" + this.Jm.toString() + " " + this.wp.toString() + " " + this.ww.toString() + " " + this.ax.toString()};
        function T(a){0 === arguments.length?S.call(this, $g):S.call(this, a); this.wr = new C(E); this.ro = new C(T); this.Nk = this.xr = this.vr = null; this.Es = !1; this.ar = !0; this.Fs = !1; this.Jb = this.ss = null; this.tq = !1; this.uq = !0; this.vq = !1; this.Nd = new ce; this.Nd.group = this}t.ga("Group", T); t.Ka(T, S);
        T.prototype.cloneProtected = function(a){S.prototype.cloneProtected.call(this, a); a.vr = this.vr; a.xr = this.xr; a.Nk = this.Nk; a.Es = this.Es; a.ar = this.ar; a.Fs = this.Fs; a.ss = this.ss; var b = a.at(function(a){return a instanceof Ug}); a.Jb = b instanceof Ug?b:null; a.tq = this.tq; a.uq = this.uq; a.vq = this.vq; null !== this.Nd?(a.Nd = this.Nd.copy(), a instanceof T && (a.Nd.group = a)):(null !== a.Nd && (a.Nd.group = null), a.Nd = null)};
        T.prototype.Yh = function(a){S.prototype.Yh.call(this, a); var b = a.cp(); for (a = a.Xc; a.next(); ){var c = a.value; c.fa(); c.J(8); c.Mf(); c instanceof T && (c.Ax = c.qe, In(c, b)); if (c instanceof S)c.vf(b); else if (c instanceof V)for (c = c.ek; c.next(); )c.value.vf(b)}};
        T.prototype.fn = function(a, b, c, d, f, g, h){if (a === wd && "elements" === b)if (f instanceof Ug)null === this.Jb?this.Jb = f:this.Jb !== f && t.m("Cannot insert a second Placeholder into the visual tree of a Group."); else{if (f instanceof y){var k = f.at(function(a){return a instanceof Ug}); k instanceof Ug && (null === this.Jb?this.Jb = k:this.Jb !== k && t.m("Cannot insert a second Placeholder into the visual tree of a Group."))}} else a === xd && "elements" === b && null !== this.Jb && (d === this.Jb?this.Jb = null:d instanceof y && this.Jb.dj(d) &&
                (this.Jb = null)); S.prototype.fn.call(this, a, b, c, d, f, g, h)}; T.prototype.Uj = function(a, b, c, d){this.Mk = this.Jb; y.prototype.Uj.call(this, a, b, c, d)}; T.prototype.nl = function(){if (!S.prototype.nl.call(this))return!1; for (var a = this.Xc; a.next(); ){var b = a.value; if (b instanceof S){if (b.Sa() && Qi(b))return!1} else if (b instanceof V && b.Sa() && Qi(b) && b.aa !== this && b.ca !== this)return!1}return!0}; t.A(T, {placeholder:"placeholder"}, function(){return this.Jb}); t.g(T, "computesBoundsAfterDrag", T.prototype.Vz);
        t.defineProperty(T, {Vz:"computesBoundsAfterDrag"}, function(){return this.tq}, function(a){var b = this.tq; b !== a && (t.i(a, "boolean", T, "computesBoundsAfterDrag"), this.tq = a, this.j("computesBoundsAfterDrag", b, a))}); t.g(T, "computesBoundsIncludingLinks", T.prototype.$D); t.defineProperty(T, {$D:"computesBoundsIncludingLinks"}, function(){return this.uq}, function(a){t.i(a, "boolean", T, "computesBoundsIncludingLinks"); var b = this.uq; b !== a && (this.uq = a, this.j("computesBoundsIncludingLinks", b, a))});
        t.g(T, "computesBoundsIncludingLocation", T.prototype.aE); t.defineProperty(T, {aE:"computesBoundsIncludingLocation"}, function(){return this.vq}, function(a){t.i(a, "boolean", T, "computesBoundsIncludingLocation"); var b = this.vq; b !== a && (this.vq = a, this.j("computesBoundsIncludingLocation", b, a))}); t.A(T, {Xc:"memberParts"}, function(){return this.wr.k});
        function Bm(a, b){if (a.wr.add(b)){b instanceof T && a.ro.add(b); var c = a.uF; if (null !== c){var d = !0, f = a.h; null !== f && (d = f.Na, f.Na = !0); c(a, b); null !== f && (f.Na = d)}}c = a.Jb; null === c && (c = a); c.fa()}function Am(a, b){if (a.wr.remove(b)){b instanceof T && a.ro.remove(b); var c = a.vF; if (null !== c){var d = !0, f = a.h; null !== f && (d = f.Na, f.Na = !0); c(a, b); null !== f && (f.Na = d)}}c = a.Jb; null === c && (c = a); c.fa()}T.prototype.Mm = function(){if (0 < this.wr.count){var a = this.h; if (null === a)return; for (var b = this.wr.copy().k; b.next(); )a.remove(b.value)}S.prototype.Mm.call(this)};
        T.prototype.ux = function(){var a = this.layer; null !== a && a.ux(this)}; t.g(T, "layout", T.prototype.jc); t.defineProperty(T, {jc:"layout"}, function(){return this.Nd}, function(a){var b = this.Nd; b !== a && (null !== a && t.l(a, ce, T, "layout"), null !== b && (b.h = null, b.group = null), this.Nd = a, null !== a && (a.h = this.h, a.group = this), this.j("layout", b, a))}); t.g(T, "memberAdded", T.prototype.uF);
        t.defineProperty(T, {uF:"memberAdded"}, function(){return this.vr}, function(a){var b = this.vr; b !== a && (null !== a && t.i(a, "function", T, "memberAdded"), this.vr = a, this.j("memberAdded", b, a))}); t.g(T, "memberRemoved", T.prototype.vF); t.defineProperty(T, {vF:"memberRemoved"}, function(){return this.xr}, function(a){var b = this.xr; b !== a && (null !== a && t.i(a, "function", T, "memberRemoved"), this.xr = a, this.j("memberRemoved", b, a))}); t.g(T, "memberValidation", T.prototype.ut);
        t.defineProperty(T, {ut:"memberValidation"}, function(){return this.Nk}, function(a){var b = this.Nk; b !== a && (null !== a && t.i(a, "function", T, "memberValidation"), this.Nk = a, this.j("memberValidation", b, a))}); T.prototype.canAddMembers = function(a){var b = this.h; if (null === b)return!1; b = b.Se; for (a = Ze(a).k; a.next(); )if (!b.isValidMember(this, a.value))return!1; return!0};
        T.prototype.addMembers = function(a, b){var c = this.h; if (null === c)return!1; for (var c = c.Se, d = !0, f = Ze(a).k; f.next(); ){var g = f.value; !b || c.isValidMember(this, g)?g.gb = this:d = !1}return d}; t.g(T, "ungroupable", T.prototype.KG); t.defineProperty(T, {KG:"ungroupable"}, function(){return this.Es}, function(a){var b = this.Es; b !== a && (t.i(a, "boolean", T, "ungroupable"), this.Es = a, this.j("ungroupable", b, a))});
        T.prototype.canUngroup = function(){if (!this.KG)return!1; var a = this.layer; if (null !== a && !a.Ro)return!1; a = a.h; return null === a || a.Ro?!0:!1}; T.prototype.invalidateConnectedLinks = T.prototype.vf = function(a){void 0 === a && (a = null); S.prototype.vf.call(this, a); for (var b = this.xE(); b.next(); ){var c = b.value; if (null === a || !a.contains(c)){var d = c.aa; null !== d && d.ml(this) && !d.Sa()?c.ac():(d = c.ca, null !== d && d.ml(this) && !d.Sa() && c.ac())}}};
        T.prototype.findExternalLinksConnected = T.prototype.xE = function(){var a = this.cp(); a.add(this); for (var b = new C(V), c = a.k; c.next(); ){var d = c.value; if (d instanceof S)for (d = d.re; d.next(); ){var f = d.value; a.contains(f) || b.add(f)}}return b.k}; T.prototype.findExternalNodesConnected = function(){var a = this.cp(); a.add(this); for (var b = new C(S), c = a.k; c.next(); ){var d = c.value; if (d instanceof S)for (d = d.re; d.next(); ){var f = d.value, g = f.aa; a.contains(g) && g !== this || b.add(g); f = f.ca; a.contains(f) && f !== this || b.add(f)}}return b.k};
        T.prototype.findSubGraphParts = T.prototype.cp = function(){var a = new C(E); Je(a, this, !0, 0); a.remove(this); return a}; T.prototype.collapseSubGraph = T.prototype.collapseSubGraph = function(){var a = this.h; if (null !== a && !a.Ud){a.Ud = !0; var b = this.cp(); In(this, b); a.Ud = !1}}; function In(a, b){a.qe = !1; for (var c = a.Xc; c.next(); ){var d = c.value; d.gh(!1); d instanceof T && (d.Ax = d.qe, In(d, b)); if (d instanceof S)d.vf(b); else if (d instanceof V)for (d = d.ek; d.next(); )d.value.vf(b)}}
T.prototype.expandSubGraph = T.prototype.expandSubGraph = function(){var a = this.h; if (null !== a && !a.Ud){var b = a.Zb; 0 !== a.ja.Je && b.tl(); a.Ud = !0; var c = this.cp(); Jn(this, c, b, this); a.Ud = !1}}; function Jn(a, b, c, d){a.qe = !0; for (a = a.Xc; a.next(); ){var f = a.value; f.fa(); f.gh(!0); f instanceof T && f.Ax && Jn(f, b, c, d); if (f instanceof S)f.vf(b), Oh(c, f, d); else if (f instanceof V)for (f = f.ek; f.next(); )f.value.vf(b)}}t.g(T, "isSubGraphExpanded", T.prototype.qe);
        t.defineProperty(T, {qe:"isSubGraphExpanded"}, function(){return this.ar}, function(a){var b = this.ar; if (b !== a){t.i(a, "boolean", T, "isSubGraphExpanded"); this.ar = a; var c = this.h; this.j("isSubGraphExpanded", b, a); b = this.vG; if (null !== b){var d = !0; null !== c && (d = c.Na, c.Na = !0); b(this); null !== c && (c.Na = d)}null !== c && c.ja.sb || (a?this.expandSubGraph():this.collapseSubGraph())}}); t.g(T, "wasSubGraphExpanded", T.prototype.Ax);
        t.defineProperty(T, {Ax:"wasSubGraphExpanded"}, function(){return this.Fs}, function(a){var b = this.Fs; b !== a && (t.i(a, "boolean", T, "wasSubGraphExpanded"), this.Fs = a, this.j("wasSubGraphExpanded", b, a))}); t.g(T, "subGraphExpandedChanged", T.prototype.vG); t.defineProperty(T, {vG:"subGraphExpandedChanged"}, function(){return this.ss}, function(a){var b = this.ss; b !== a && (null !== a && t.i(a, "function", T, "subGraphExpandedChanged"), this.ss = a, this.j("subGraphExpandedChanged", b, a))});
        T.prototype.move = T.prototype.move = function(a){var b = this.position, c = b.x; isNaN(c) && (c = 0); b = b.y; isNaN(b) && (b = 0); var c = a.x - c, b = a.y - b, d = t.lc(c, b); S.prototype.move.call(this, a); for (a = this.cp().k; a.next(); ){var f = a.value; if (!(f instanceof V || f.bi)){var g = f.position; d.x = g.x + c; d.y = g.y + b; S.prototype.move.call(f, d)}}for (a.reset(); a.next(); )f = a.value, f instanceof V && (g = f.position, d.x = g.x + c, d.y = g.y + b, f.move(d)); t.B(d)}; function Ug(){Q.call(this); this.Ne = H.eq; this.bs = new x(NaN, NaN, NaN, NaN)}
t.ga("Placeholder", Ug); t.Ka(Ug, Q); Ug.prototype.cloneProtected = function(a){Q.prototype.cloneProtected.call(this, a); a.Ne = this.Ne.Z(); a.bs = this.bs.copy()}; Ug.prototype.Vj = function(a){if (null === this.background && null === this.Zk)return!1; var b = this.Qa; return mb(0, 0, b.width, b.height, a.x, a.y)};
        Ug.prototype.tt = function(){var a = this.S; null !== a && (a instanceof T || a instanceof Ke) || t.m("Placeholder is not inside a Group or Adornment."); if (a instanceof T){var b = this.computeBorder(this.bs), c = this.gd; Va(c, b.width || 0, b.height || 0); hk(this, 0, 0, c.width, c.height); for (var c = a.Xc, d = !1; c.next(); )if (c.value.Sa()){d = !0; break}!d || isNaN(b.x) || isNaN(b.y) || (c = new w, c.Nt(b, a.bf), a.location = new w(c.x, c.y))} else{var b = this.Ca, c = this.gd, a = this.padding, d = a.left + a.right, f = a.top + a.bottom; if (b.N())Va(c, b.width + d || 0,
                b.height + f || 0), hk(this, - a.left, - a.top, c.width, c.height); else{var g = this.S, h = g.pc, k = h.qb(Eb, t.K()), b = t.hk(k.x, k.y, 0, 0); b.jj(h.qb(Pb, k)); b.jj(h.qb(Gb, k)); b.jj(h.qb(Lb, k)); g.Wg.p(b.x, b.y); Va(c, b.width + d || 0, b.height + f || 0); hk(this, - a.left, - a.top, c.width, c.height); t.B(k); t.hc(b)}}}; Ug.prototype.Uj = function(a, b, c, d){var f = this.pa; f.x = a; f.y = b; f.width = c; f.height = d};
        Ug.prototype.computeBorder = function(a){var b = this.S; if (b instanceof T && b.Vz && this.bs.N()){var c = b.h; if (null !== c && (c = c.Ua, c instanceof df && !c.Hq && null !== c.Dc && !c.Dc.contains(b)))return a.assign(this.bs), a}var c = t.Df(), d = this.computeMemberBounds(c), f = this.padding; a.p(d.x - f.left, d.y - f.top, d.width + f.left + f.right, d.height + f.top + f.bottom); t.hc(c); b instanceof T && b.aE && b.location.N() && a.jj(b.location); return a};
        Ug.prototype.computeMemberBounds = function(a){var b = this.S; if (!(b instanceof T))return a.p(0, 0, 0, 0), a; for (var c = Infinity, d = Infinity, f = - Infinity, g = - Infinity, h = b.Xc; h.next(); ){var k = h.value; if (k.Sa()){if (k instanceof V){if (!b.$D)continue; if (Pi(k))continue; if (k.aa === b || k.ca === b)continue}k = k.pa; k.left < c && (c = k.left); k.top < d && (d = k.top); k.right > f && (f = k.right); k.bottom > g && (g = k.bottom)}}isFinite(c) && isFinite(d)?a.p(c, d, f - c, g - d):(b = b.location, c = this.padding, a.p(b.x + c.left, b.y + c.top, 0, 0)); return a};
        t.g(Ug, "padding", Ug.prototype.padding); t.defineProperty(Ug, {padding:"padding"}, function(){return this.Ne}, function(a){"number" === typeof a?(0 > a && t.la(a, ">= 0", Ug, "padding"), a = new ab(a)):(t.l(a, ab, Ug, "padding"), 0 > a.left && t.la(a.left, ">= 0", Ug, "padding:val.left"), 0 > a.right && t.la(a.right, ">= 0", Ug, "padding:val.right"), 0 > a.top && t.la(a.top, ">= 0", Ug, "padding:val.top"), 0 > a.bottom && t.la(a.bottom, ">= 0", Ug, "padding:val.bottom")); var b = this.Ne; b.M(a) || (this.Ne = a = a.Z(), this.j("padding", b, a))});
        function ce(){0 < arguments.length && t.$c(ce); t.Ac(this); this.Ty = this.U = null; this.Wq = this.Yq = !0; this.fr = this.eo = !1; this.mq = (new w(0, 0)).freeze(); this.Zy = !0; this.iz = null; this.Zq = !0}t.ga("Layout", ce); ce.prototype.cloneProtected = function(a){a.Yq = this.Yq; a.Wq = this.Wq; this.Wq || (a.eo = !0); a.fr = this.fr; a.mq.assign(this.mq); a.Zq = this.Zq}; ce.prototype.copy = function(){var a = new this.constructor; this.cloneProtected(a); return a};
        ce.prototype.toString = function(){var a = t.ug(Object.getPrototypeOf(this)), a = a + "("; null !== this.group && (a += " in " + this.group); null !== this.h && (a += " for " + this.h); return a + ")"}; t.g(ce, "diagram", ce.prototype.h); t.defineProperty(ce, {h:"diagram"}, function(){return this.U}, function(a){this.U !== a && (null !== a && t.l(a, z, ce, "diagram"), this.U = a)}); t.g(ce, "group", ce.prototype.group);
        t.defineProperty(ce, {group:"group"}, function(){return this.Ty}, function(a){this.Ty !== a && (null !== a && t.l(a, T, ce, "group"), this.Ty = a, null !== a && (this.U = a.h))}); t.g(ce, "isOngoing", ce.prototype.eF); t.defineProperty(ce, {eF:"isOngoing"}, function(){return this.Yq}, function(a){this.Yq !== a && (t.i(a, "boolean", ce, "isOngoing"), this.Yq = a)}); t.g(ce, "isInitial", ce.prototype.dF); t.defineProperty(ce, {dF:"isInitial"}, function(){return this.Wq}, function(a){t.i(a, "boolean", ce, "isInitial"); this.Wq = a; a || (this.eo = !0)});
        t.g(ce, "isValidLayout", ce.prototype.$e); t.defineProperty(ce, {$e:"isValidLayout"}, function(){return this.eo}, function(a){this.eo !== a && (t.i(a, "boolean", ce, "isValidLayout"), this.eo = a, a || (a = this.h, null !== a && (a.ju = !0)))}); ce.prototype.invalidateLayout = ce.prototype.J = function(){if (this.eo){var a = this.h; if (null !== a && !a.ja.sb){var b = a.Zb; !b.br && (b.vg && b.mn(), this.eF && a.kf || this.dF && !a.kf) && (this.$e = !1, a.Zd())}}}; t.g(ce, "isRealtime", ce.prototype.xA);
        t.defineProperty(ce, {xA:"isRealtime"}, function(){return this.Zq}, function(a){this.Zq !== a && (t.i(a, "boolean", ce, "isRealtime"), this.Zq = a)}); t.g(ce, "isViewportSized", ce.prototype.rt); t.defineProperty(ce, {rt:"isViewportSized"}, function(){return this.fr}, function(a){this.fr !== a && (t.i(a, "boolean", ce, "isViewportSized"), (this.fr = a) && this.J())}); t.g(ce, "isRouting", ce.prototype.qt);
        t.defineProperty(ce, {qt:"isRouting"}, function(){return this.Zy}, function(a){this.Zy !== a && (t.i(a, "boolean", ce, "isRouting"), this.Zy = a)}); t.g(ce, "network", ce.prototype.network); t.defineProperty(ce, {network:"network"}, function(){return this.iz}, function(a){var b = this.iz; b !== a && (null !== a && t.l(a, ra, ce, "network"), null !== b && Kn(b, null), this.iz = a, null !== a && Kn(a, this))}); ce.prototype.createNetwork = function(){var a = new ra; Kn(a, this); return a};
        ce.prototype.makeNetwork = function(a){var b = this.createNetwork(); a instanceof z?(b.Ks(a.jh, !0), b.Ks(a.links, !0)):a instanceof T?b.Ks(a.Xc):b.Ks(a.k); return b}; ce.prototype.updateParts = function(){var a = this.h; if (null === a && null !== this.network)for (var b = this.network.vertexes.k; b.next(); ){var c = b.value.Fc; if (null !== c && (a = c.h, null !== a))break}this.$e = !0; null !== a && a.tc("Layout"); this.commitLayout(); null !== a && a.Ce("Layout")}; ce.prototype.commitLayout = function(){};
        ce.prototype.doLayout = function(a){a || t.m("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts"); var b = new C(E); a === this.h?(Ln(this, b, a.jh, !0, this.GA, !0, !1, !0), Ln(this, b, a.rl, !0, this.GA, !0, !1, !0)):a === this.group?Ln(this, b, a.Xc, !1, this.GA, !0, !1, !0):b.Oe(a.k); var c = b.count; if (0 < c){a = this.h; null !== a && a.tc("Layout"); for (var c = Math.ceil(Math.sqrt(c)), d = this.Dd.x, f = d, g = this.Dd.y, h = 0, k = 0, b = b.k; b.next(); ){var l = b.value; l.rf(); var m = l.Ea, n = m.width, m = m.height;
                l.moveTo(f, g); delete l.LC; f += Math.max(n, 50) + 20; k = Math.max(k, Math.max(m, 50)); h >= c - 1?(h = 0, f = d, g += k + 20, k = 0):h++}null !== a && a.Ce("Layout")}this.$e = !0}; ce.prototype.GA = function(a){return!a.location.N() || a instanceof T && a.LC?!0:!1}; function Ln(a, b, c, d, f, g, h, k){for (c = c.k; c.next(); ){var l = c.value; d && !l.rp || f && !f(l) || l.canLayout() && (g && l instanceof S?l.bi || (l instanceof T && null === l.jc?Ln(a, b, l.Xc, !1, f, g, h, k):b.add(l)):h && l instanceof V?b.add(l):!k || !l.Jd() || l instanceof S || b.add(l))}}
t.g(ce, "arrangementOrigin", ce.prototype.Dd); t.defineProperty(ce, {Dd:"arrangementOrigin"}, function(){return this.mq}, function(a){t.l(a, w, ce, "arrangementOrigin"); this.mq.M(a) || (this.mq.assign(a), this.J())}); ce.prototype.initialOrigin = function(a){var b = this.group; if (null !== b){var c = b.location; if (isNaN(c.x) || isNaN(c.y))return a; a = b.placeholder; null !== a?(c = a.qb(Eb), c.x += a.padding.left, c.y += a.padding.top):c = b.position.copy(); return c}return a}; function ra(){t.Ac(this); this.Nd = null; this.clear()}
t.ga("LayoutNetwork", ra); ra.prototype.clear = function(){if (this.vertexes)for (var a = this.vertexes.k; a.next(); ){var b = a.value; b.clear(); b.network = null}if (this.edges)for (a = this.edges.k; a.next(); )b = a.value, b.clear(), b.network = null; this.vertexes = new C(ta); this.edges = new C(ua); this.JA = new ja(S, ta); this.zA = new ja(V, ua)}; ra.prototype.toString = function(){return"LayoutNetwork" + (null !== this.jc?"(" + this.jc.toString() + ")":"")}; t.A(ra, {jc:"layout"}, function(){return this.Nd});
        function Kn(a, b){e && null !== b && t.l(b, ce, ra, "setLayout"); a.Nd = b}ra.prototype.createVertex = function(){return new ta}; ra.prototype.createEdge = function(){return new ua};
        ra.prototype.addParts = ra.prototype.Ks = function(a, b){if (null !== a){void 0 === b && (b = !1); t.i(b, "boolean", ra, "addParts:toplevelonly"); for (var c = a.k; c.next(); ){var d = c.value; if (d instanceof S && (!b || d.rp) && d.canLayout() && !d.bi)if (d instanceof T && null === d.jc)this.Ks(d.Xc, !1); else if (null === this.Qm(d)){var f = this.createVertex(); f.Fc = d; this.Xk(f)}}for (c.reset(); c.next(); )if (d = c.value, d instanceof V && (!b || d.rp) && d.canLayout() && null === this.xw(d)){var g = d.aa, f = d.ca; g !== f && (g = this.findGroupVertex(g), f = this.findGroupVertex(f),
                null !== g && null !== f && this.$m(g, f, d))}}}; ra.prototype.findGroupVertex = function(a){if (null === a)return null; var b = a.findVisibleNode(); if (null === b)return null; a = this.Qm(b); if (null !== a)return a; for (b = b.gb; null !== b; ){a = this.Qm(b); if (null !== a)return a; b = b.gb}return null}; ra.prototype.addVertex = ra.prototype.Xk = function(a){if (null !== a){e && t.l(a, ta, ra, "addVertex:vertex"); this.vertexes.add(a); var b = a.Fc; null !== b && this.JA.add(b, a); a.network = this}};
        ra.prototype.addNode = ra.prototype.Ko = function(a){if (null === a)return null; e && t.l(a, S, ra, "addNode:node"); var b = this.Qm(a); null === b && (b = this.createVertex(), b.Fc = a, this.Xk(b)); return b}; ra.prototype.deleteVertex = ra.prototype.rE = function(a){if (null !== a && (e && t.l(a, ta, ra, "deleteVertex:vertex"), Mn(this, a))){for (var b = a.ef, c = b.count - 1; 0 <= c; c--){var d = b.wa(c); this.Yo(d)}b = a.Te; for (c = b.count - 1; 0 <= c; c--)d = b.wa(c), this.Yo(d)}};
        function Mn(a, b){if (null === b)return!1; var c = a.vertexes.remove(b); c && (a.JA.remove(b.Fc), b.network = null); return c}ra.prototype.deleteNode = function(a){null !== a && (e && t.l(a, S, ra, "deleteNode:node"), a = this.Qm(a), null !== a && this.rE(a))}; ra.prototype.findVertex = ra.prototype.Qm = function(a){if (null === a)return null; e && t.l(a, S, ra, "findVertex:node"); return this.JA.za(a)};
        ra.prototype.addEdge = ra.prototype.Jo = function(a){if (null !== a){e && t.l(a, ua, ra, "addEdge:edge"); this.edges.add(a); var b = a.link; null !== b && null === this.xw(b) && this.zA.add(b, a); b = a.toVertex; null !== b && b.HD(a); b = a.fromVertex; null !== b && b.FD(a); a.network = this}};
        ra.prototype.addLink = function(a){if (null === a)return null; e && t.l(a, V, ra, "addLink:link"); var b = a.aa, c = a.ca, d = this.xw(a); null === d?(d = this.createEdge(), d.link = a, null !== b && (d.fromVertex = this.Ko(b)), null !== c && (d.toVertex = this.Ko(c)), this.Jo(d)):(d.fromVertex = null !== b?this.Ko(b):null, d.toVertex = null !== c?this.Ko(c):null); return d}; ra.prototype.deleteEdge = ra.prototype.Yo = function(a){if (null !== a){e && t.l(a, ua, ra, "deleteEdge:edge"); var b = a.toVertex; null !== b && b.qE(a); b = a.fromVertex; null !== b && b.pE(a); Nn(this, a)}};
        function Nn(a, b){null !== b && a.edges.remove(b) && (a.zA.remove(b.link), b.network = null)}ra.prototype.deleteLink = function(a){null !== a && (e && t.l(a, V, ra, "deleteLink:link"), a = this.xw(a), null !== a && this.Yo(a))}; ra.prototype.findEdge = ra.prototype.xw = function(a){if (null === a)return null; e && t.l(a, V, ra, "findEdge:link"); return this.zA.za(a)};
        ra.prototype.linkVertexes = ra.prototype.$m = function(a, b, c){if (null === a || null === b)return null; e && (t.l(a, ta, ra, "linkVertexes:fromVertex"), t.l(b, ta, ra, "linkVertexes:toVertex"), null !== c && t.l(c, V, ra, "linkVertexes:link")); if (a.network === this && b.network === this){var d = this.createEdge(); d.link = c; d.fromVertex = a; d.toVertex = b; this.Jo(d); return d}return null};
        ra.prototype.reverseEdge = ra.prototype.kx = function(a){if (null !== a){e && t.l(a, ua, ra, "reverseEdge:edge"); var b = a.fromVertex, c = a.toVertex; null !== b && null !== c && (b.pE(a), c.qE(a), a.kx(), b.HD(a), c.FD(a))}}; ra.prototype.deleteSelfEdges = ra.prototype.tw = function(){for (var a = t.Cb(), b = this.edges.k; b.next(); ){var c = b.value; c.fromVertex === c.toVertex && a.push(c)}b = a.length; for (c = 0; c < b; c++)this.Yo(a[c]); t.ya(a)};
        ra.prototype.deleteArtificialVertexes = function(){for (var a = t.Cb(), b = this.vertexes.k; b.next(); ){var c = b.value; null === c.Fc && a.push(c)}c = a.length; for (b = 0; b < c; b++)this.rE(a[b]); c = t.Cb(); for (b = this.edges.k; b.next(); ){var d = b.value; null === d.link && c.push(d)}d = c.length; for (b = 0; b < d; b++)this.Yo(c[b]); t.ya(a); t.ya(c)}; function On(a){for (var b = t.Cb(), c = a.edges.k; c.next(); ){var d = c.value; null !== d.fromVertex && null !== d.toVertex || b.push(d)}c = b.length; for (d = 0; d < c; d++)a.Yo(b[d]); t.ya(b)}
ra.prototype.splitIntoSubNetworks = ra.prototype.SJ = function(){this.deleteArtificialVertexes(); On(this); this.tw(); for (var a = new B(ra), b = !0; b; )for (var b = !1, c = this.vertexes.k; c.next(); ){var d = c.value; if (0 < d.ef.count || 0 < d.Te.count){b = this.jc.createNetwork(); a.add(b); Pn(this, b, d); b = !0; break}}a.sort(function(a, b){return null === a || null === b || a === b?0:b.vertexes.count - a.vertexes.count}); return a};
        function Pn(a, b, c){if (null !== c && c.network !== b){Mn(a, c); b.Xk(c); for (var d = c.sc; d.next(); ){var f = d.value; f.network !== b && (Nn(a, f), b.Jo(f), Pn(a, b, f.fromVertex))}for (d = c.gc; d.next(); )f = d.value, f.network !== b && (Nn(a, f), b.Jo(f), Pn(a, b, f.toVertex))}}ra.prototype.findAllParts = function(){for (var a = new C(E), b = this.vertexes.k; b.next(); )a.add(b.value.Fc); for (b = this.edges.k; b.next(); )a.add(b.value.link); return a};
        function ta(){t.Ac(this); this.network = null; this.T = (new x(0, 0, 10, 10)).freeze(); this.O = (new w(5, 5)).freeze(); this.clear()}t.ga("LayoutVertex", ta); ta.prototype.clear = function(){this.rd = null; this.ef = new B(ua); this.Te = new B(ua)}; ta.prototype.toString = function(){return"LayoutVertex#" + t.od(this) + (null !== this.Fc?"(" + this.Fc.toString() + ")":"")}; t.g(ta, "node", ta.prototype.Fc);
        t.defineProperty(ta, {Fc:"node"}, function(){return this.rd}, function(a){if (this.rd !== a){e && null !== a && t.l(a, S, ta, "node"); this.rd = a; a.rf(); var b = a.pa, c = b.x, d = b.y, f = b.width, b = b.height; isNaN(c) && (c = 0); isNaN(d) && (d = 0); this.T.p(c, d, f, b); if (!(a instanceof T) && (a = a.kc.qb(Kb), a.N())){this.O.p(a.x - c, a.y - d); return}this.O.p(f / 2, b / 2)}}); t.g(ta, "bounds", ta.prototype.Ob); t.defineProperty(ta, {Ob:"bounds"}, function(){return this.T}, function(a){this.T.M(a) || (e && t.l(a, x, ta, "bounds"), this.T.assign(a))});
        t.g(ta, "focus", ta.prototype.focus); t.defineProperty(ta, {focus:"focus"}, function(){return this.O}, function(a){this.O.M(a) || (e && t.l(a, w, ta, "focus"), this.O.assign(a))}); t.g(ta, "centerX", ta.prototype.Da); t.defineProperty(ta, {Da:"centerX"}, function(){return this.T.x + this.O.x}, function(a){var b = this.T; b.x + this.O.x !== a && (e && t.q(a, ta, "centerX"), b.La(), b.x = a - this.O.x, b.freeze())}); t.g(ta, "centerY", ta.prototype.Pa);
        t.defineProperty(ta, {Pa:"centerY"}, function(){return this.T.y + this.O.y}, function(a){var b = this.T; b.y + this.O.y !== a && (e && t.q(a, ta, "centerY"), b.La(), b.y = a - this.O.y, b.freeze())}); t.g(ta, "focusX", ta.prototype.ep); t.defineProperty(ta, {ep:"focusX"}, function(){return this.O.x}, function(a){var b = this.O; b.x !== a && (b.La(), b.x = a, b.freeze())}); t.g(ta, "focusY", ta.prototype.fp); t.defineProperty(ta, {fp:"focusY"}, function(){return this.O.y}, function(a){var b = this.O; b.y !== a && (b.La(), b.y = a, b.freeze())}); t.g(ta, "x", ta.prototype.x);
        t.defineProperty(ta, {x:"x"}, function(){return this.T.x}, function(a){var b = this.T; b.x !== a && (b.La(), b.x = a, b.freeze())}); t.g(ta, "y", ta.prototype.y); t.defineProperty(ta, {y:"y"}, function(){return this.T.y}, function(a){var b = this.T; b.y !== a && (b.La(), b.y = a, b.freeze())}); t.g(ta, "width", ta.prototype.width); t.defineProperty(ta, {width:"width"}, function(){return this.T.width}, function(a){var b = this.T; b.width !== a && (b.La(), b.width = a, b.freeze())}); t.g(ta, "height", ta.prototype.height);
        t.defineProperty(ta, {height:"height"}, function(){return this.T.height}, function(a){var b = this.T; b.height !== a && (b.La(), b.height = a, b.freeze())}); ta.prototype.commit = function(){var a = this.Fc; if (null !== a){var b = this.Ob; if (!(a instanceof T)){var c = a.pa, d = a.kc.qb(Kb); if (c.N() && d.N()){a.moveTo(b.x + this.ep - (d.x - c.x), b.y + this.fp - (d.y - c.y)); return}}a.moveTo(b.x, b.y)}}; ta.prototype.addSourceEdge = ta.prototype.HD = function(a){null !== a && (e && t.l(a, ua, ta, "addSourceEdge:edge"), this.ef.contains(a) || this.ef.add(a))};
        ta.prototype.deleteSourceEdge = ta.prototype.qE = function(a){null !== a && (e && t.l(a, ua, ta, "deleteSourceEdge:edge"), this.ef.remove(a))}; ta.prototype.addDestinationEdge = ta.prototype.FD = function(a){null !== a && (e && t.l(a, ua, ta, "addDestinationEdge:edge"), this.Te.contains(a) || this.Te.add(a))}; ta.prototype.deleteDestinationEdge = ta.prototype.pE = function(a){null !== a && (e && t.l(a, ua, ta, "deleteDestinationEdge:edge"), this.Te.remove(a))};
        t.A(ta, {PJ:"sourceVertexes"}, function(){for (var a = new C(ta), b = this.sc; b.next(); ){var c = b.value.fromVertex; null === c || a.contains(c) || a.add(c)}return a.k}); t.A(ta, {vI:"destinationVertexes"}, function(){for (var a = new C(ta), b = this.gc; b.next(); ){var c = b.value.toVertex; null === c || a.contains(c) || a.add(c)}return a.k});
        t.A(ta, {vertexes:"vertexes"}, function(){for (var a = new C(ta), b = this.sc; b.next(); ){var c = b.value, c = c.fromVertex; null === c || a.contains(c) || a.add(c)}for (b = this.gc; b.next(); )c = b.value, c = c.toVertex, null === c || a.contains(c) || a.add(c); return a.k}); t.A(ta, {sc:"sourceEdges"}, function(){return this.ef.k}); t.A(ta, {gc:"destinationEdges"}, function(){return this.Te.k}); t.A(ta, {edges:"edges"}, function(){for (var a = new B(ua), b = this.sc; b.next(); ){var c = b.value; a.add(c)}for (b = this.gc; b.next(); )c = b.value, a.add(c); return a.k});
        t.A(ta, {BI:"edgesCount"}, function(){return this.ef.count + this.Te.count}); var Qn; ta.standardComparer = Qn = function(a, b){e && t.l(a, ta, ta, "standardComparer:m"); e && t.l(b, ta, ta, "standardComparer:n"); var c = a.rd, d = b.rd; return c?d?(c = c.text, d = d.text, c < d? - 1:c > d?1:0):1:null !== d? - 1:0};
        ta.smartComparer = function(a, b){e && t.l(a, ta, ta, "smartComparer:m"); e && t.l(b, ta, ta, "smartComparer:n"); if (null !== a){if (null !== b){var c = a.rd, d = b.rd; if (null !== c){if (null !== d){var c = c.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/), d = d.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/), f; for (f = 0; f < c.length; f++)if ("" !== d[f] && void 0 !== d[f]){var g = parseFloat(c[f]), h = parseFloat(d[f]); if (isNaN(g)){if (!isNaN(h))return 1; if (0 !== c[f].localeCompare(d[f]))return c[f].localeCompare(d[f])} else{if (isNaN(h))return - 1;
                if (0 !== g - h)return g - h}} else if ("" !== c[f])return 1; return"" !== d[f] && void 0 !== d[f]? - 1:0}return 1}return null !== d? - 1:0}return 1}return null !== b? - 1:0}; function ua(){t.Ac(this); this.network = null; this.clear()}t.ga("LayoutEdge", ua); ua.prototype.clear = function(){this.toVertex = this.fromVertex = this.link = null}; ua.prototype.toString = function(){return"LayoutEdge#" + t.od(this) + (null !== this.link?"(" + this.link.toString() + ")":"")};
        ua.prototype.kx = function(){var a = this.fromVertex; this.fromVertex = this.toVertex; this.toVertex = a}; ua.prototype.commit = function(){}; ua.prototype.getOtherVertex = ua.prototype.GI = function(a){e && t.l(a, ta, ua, "getOtherVertex:v"); return this.toVertex === a?this.fromVertex:this.fromVertex === a?this.toVertex:null};
        function Xj(){0 < arguments.length && t.$c(Xj); ce.call(this); this.rt = !0; this.Hs = this.Is = NaN; this.pj = (new ga(NaN, NaN)).freeze(); this.Nh = (new ga(10, 10)).freeze(); this.ue = fl; this.bd = dl; this.Mh = $k; this.th = Rn}t.ga("GridLayout", Xj); t.Ka(Xj, ce); Xj.prototype.cloneProtected = function(a){ce.prototype.cloneProtected.call(this, a); a.Is = this.Is; a.Hs = this.Hs; a.pj.assign(this.pj); a.Nh.assign(this.Nh); a.ue = this.ue; a.bd = this.bd; a.Mh = this.Mh; a.th = this.th};
        Xj.prototype.doLayout = function(a){a || t.m("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts"); var b = this.h; null === b && null === this.group && t.m("The diagram for this layout is not set."); this.Dd = this.initialOrigin(this.Dd); var c = new C(E); a === b?(Ln(this, c, a.jh, !0, null, !0, !0, !0), Ln(this, c, a.links, !0, null, !0, !0, !0), Ln(this, c, a.rl, !0, null, !0, !0, !0)):a === this.group?Ln(this, c, a.Xc, !1, null, !0, !0, !0):c.Oe(a.k); for (a = c.copy().k; a.next(); ){var d = a.value; if (d instanceof
                V && (null !== d.aa || null !== d.ca))c.remove(d); else if (d.rf(), d instanceof T)for (d = d.Xc; d.next(); )c.remove(d.value)}c = c.Ie(); if (0 !== c.length){switch (this.sorting){case cl:c.reverse(); break; case $k:c.sort(this.comparer); break; case al:c.sort(this.comparer), c.reverse()}var f = this.XG; isNaN(f) && (f = 0); var g = this.rB, g = isNaN(g)?Math.max(b.xb.width - b.padding.left - b.padding.right, 0):Math.max(this.rB, 0); 0 >= f && 0 >= g && (f = 1); a = this.spacing.width; isFinite(a) || (a = 0); d = this.spacing.height; isFinite(d) || (d = 0); b.tc("Layout");
                var h = []; switch (this.alignment){case gl:var k = a, l = d, m = Math.max(this.$k.width, 1); if (!isFinite(m))for (var n = m = 0; n < c.length; n++)var p = c[n], q = p.Ea, m = Math.max(m, q.width); var m = Math.max(m + k, 1), r = Math.max(this.$k.height, 1); if (!isFinite(r))for (n = r = 0; n < c.length; n++)p = c[n], q = p.Ea, r = Math.max(r, q.height); for (var r = Math.max(r + l, 1), s = this.Qe, u = this.Dd.x, v = u, D = this.Dd.y, A = 0, G = 0, n = 0; n < c.length; n++){var p = c[n], q = p.Ea, L = Math.ceil((q.width + k) / m) * m, N = Math.ceil((q.height + l) / r) * r, O; switch (s){case el:O = Math.abs(v - q.width);
                break; default:O = v + q.width}if (0 < f && A > f - 1 || 0 < g && 0 < A && O > g)h.push(new x(0, D, g, G + l)), A = 0, v = u, D += G, G = 0; G = Math.max(G, N); switch (s){case el:q = - q.width; break; default:q = 0}p.moveTo(v + q, D); switch (s){case el:v -= L; break; default:v += L}A++}h.push(new x(0, D, g, G + l)); break; case fl:k = a; l = d; m = Math.max(this.$k.width, 1); n = A = q = 0; p = t.K(); for (r = 0; r < c.length; r++)s = c[r], u = s.Ea, v = ym(s, s.kc, s.bf, p), q = Math.max(q, v.x), A = Math.max(A, u.width - v.x), n = Math.max(n, v.y); D = this.Qe; switch (D){case el:q += k; break; default:A += k}var m = isFinite(m)?
                Math.max(m + k, 1):Math.max(q + A, 1), U = A = this.Dd.x, G = this.Dd.y, L = 0; g >= q && (g -= q); q = 0; N = Math.max(this.$k.height, 1); O = n = 0; for (var Y = !0, ba = t.K(), r = 0; r < c.length; r++){s = c[r]; u = s.Ea; v = ym(s, s.kc, s.bf, p); if (0 < L)switch (D){case el:U = Math.floor((U - A - (u.width - v.x)) / m) * m + A; break; default:U = Math.ceil((U - A + v.x) / m) * m + A} else switch (D){case el:q = U + v.x + u.width; break; default:q = U - v.x}var R; switch (D){case el:R = - (U + v.x) + q; break; default:R = U + u.width - v.x - q}if (0 < f && L > f - 1 || 0 < g && 0 < L && R > g){h.push(new x(0, G, g, (Y?O:O + n) + l)); for (U = 0; U <
                L && r !== L; U++){R = c[r - L + U]; var xa = ym(R, R.kc, R.bf, ba); R.moveTo(R.position.x, R.position.y + n - xa.y)}O += l; G = Y?G + O:G + (O + n); L = O = n = 0; U = A; Y = !1}n = Math.max(n, v.y); O = Math.max(O, u.height - v.y); isFinite(N) && (O = Math.max(O, Math.max(u.height, N) - v.y)); Y?s.moveTo(U - v.x, G - v.y):s.moveTo(U - v.x, G); switch (D){case el:U -= v.x + k; break; default:U += u.width - v.x + k}L++}h.push(new x(0, G, g, (Y?O:O + n) + l)); for (U = 0; U < L && r !== L; U++)R = c[r - L + U], xa = ym(R, R.kc, R.bf, p), R.moveTo(R.position.x, R.position.y + n - xa.y); t.B(p); t.B(ba)}this.commitLayers(h,
                new w( - a / 2, - d / 2)); b.Ce("Layout"); this.$e = !0}}; Xj.prototype.commitLayers = function(){}; t.g(Xj, "wrappingWidth", Xj.prototype.rB); t.defineProperty(Xj, {rB:"wrappingWidth"}, function(){return this.Is}, function(a){this.Is !== a && (t.i(a, "number", Xj, "wrappingWidth"), 0 < a || isNaN(a)) && (this.Is = a, this.rt = isNaN(a), this.J())}); t.g(Xj, "wrappingColumn", Xj.prototype.XG);
        t.defineProperty(Xj, {XG:"wrappingColumn"}, function(){return this.Hs}, function(a){this.Hs !== a && (t.i(a, "number", Xj, "wrappingColumn"), 0 < a || isNaN(a)) && (this.Hs = a, this.J())}); t.g(Xj, "cellSize", Xj.prototype.$k); t.defineProperty(Xj, {$k:"cellSize"}, function(){return this.pj}, function(a){t.l(a, ga, Xj, "cellSize"); this.pj.M(a) || (this.pj.assign(a), this.J())}); t.g(Xj, "spacing", Xj.prototype.spacing);
        t.defineProperty(Xj, {spacing:"spacing"}, function(){return this.Nh}, function(a){t.l(a, ga, Xj, "spacing"); this.Nh.M(a) || (this.Nh.assign(a), this.J())}); t.g(Xj, "alignment", Xj.prototype.alignment); t.defineProperty(Xj, {alignment:"alignment"}, function(){return this.ue}, function(a){this.ue !== a && (t.Aa(a, Xj, Xj, "alignment"), a === fl || a === gl) && (this.ue = a, this.J())}); t.g(Xj, "arrangement", Xj.prototype.Qe);
        t.defineProperty(Xj, {Qe:"arrangement"}, function(){return this.bd}, function(a){this.bd !== a && (t.Aa(a, Xj, Xj, "arrangement"), a === dl || a === el) && (this.bd = a, this.J())}); t.g(Xj, "sorting", Xj.prototype.sorting); t.defineProperty(Xj, {sorting:"sorting"}, function(){return this.Mh}, function(a){this.Mh !== a && (t.Aa(a, Xj, Xj, "sorting"), a === bl || a === cl || a === $k || a === al) && (this.Mh = a, this.J())}); t.g(Xj, "comparer", Xj.prototype.comparer);
        t.defineProperty(Xj, {comparer:"comparer"}, function(){return this.th}, function(a){this.th !== a && (t.i(a, "function", Xj, "comparer"), this.th = a, this.J())}); var Rn; Xj.standardComparer = Rn = function(a, b){e && t.l(a, E, Xj, "standardComparer:a"); e && t.l(b, E, Xj, "standardComparer:b"); var c = a.text, d = b.text; return c < d? - 1:c > d?1:0};
        Xj.smartComparer = function(a, b){e && t.l(a, E, Xj, "standardComparer:a"); e && t.l(b, E, Xj, "standardComparer:b"); if (null !== a){if (null !== b){var c = a.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/), d = b.text.toLocaleLowerCase().split(/([+\-]?[\.]?\d+(?:\.\d*)?(?:e[+\-]?\d+)?)/), f; for (f = 0; f < c.length; f++)if ("" !== d[f] && void 0 !== d[f]){var g = parseFloat(c[f]), h = parseFloat(d[f]); if (isNaN(g)){if (!isNaN(h))return 1; if (0 !== c[f].localeCompare(d[f]))return c[f].localeCompare(d[f])} else{if (isNaN(h))return - 1;
                if (0 !== g - h)return g - h}} else if ("" !== c[f])return 1; return"" !== d[f] && void 0 !== d[f]? - 1:0}return 1}return null !== b? - 1:0}; var gl; Xj.Position = gl = t.w(Xj, "Position", 0); var fl; Xj.Location = fl = t.w(Xj, "Location", 1); var dl; Xj.LeftToRight = dl = t.w(Xj, "LeftToRight", 2); var el; Xj.RightToLeft = el = t.w(Xj, "RightToLeft", 3); var bl; Xj.Forward = bl = t.w(Xj, "Forward", 4); var cl; Xj.Reverse = cl = t.w(Xj, "Reverse", 5); var $k; Xj.Ascending = $k = t.w(Xj, "Ascending", 6); var al; Xj.Descending = al = t.w(Xj, "Descending", 7);
        function hl(){0 < arguments.length && t.$c(hl); ce.call(this); this.Ky = this.On = this.yd = 0; this.Iq = 360; this.Jy = yl; this.Ak = 0; this.fC = yl; this.ru = this.qg = this.wD = 0; this.Tv = new Sn; this.uu = this.jm = 0; this.qH = 600; this.Qr = NaN; this.oq = 1; this.rs = 0; this.us = 360; this.bd = yl; this.sa = pl; this.Mh = ml; this.th = Qn; this.Nh = 6; this.Hr = Bl}t.ga("CircularLayout", hl); t.Ka(hl, ce);
        hl.prototype.cloneProtected = function(a){ce.prototype.cloneProtected.call(this, a); a.Qr = this.Qr; a.oq = this.oq; a.rs = this.rs; a.us = this.us; a.bd = this.bd; a.sa = this.sa; a.Mh = this.Mh; a.th = this.th; a.Nh = this.Nh; a.Hr = this.Hr}; hl.prototype.createNetwork = function(){var a = new Tn; Kn(a, this); return a};
        hl.prototype.doLayout = function(a){a || t.m("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts"); null === this.network && (this.network = this.makeNetwork(a)); a = this.network.vertexes; if (1 >= a.count)1 === a.count && (a = a.$a(), a.Da = 0, a.Pa = 0); else{var b = new B(Un); b.Oe(a.k); a = new B(Un); var c = new B(Un), b = this.sort(b); a = new B(Un); var c = new B(Un), d = this.Jy, f = this.fC, g = this.yd, h = this.On, k = this.Ky, l = this.Iq, m = this.Ak, n = this.wD, p = this.qg, q = this.ru, d = this.Qe, f = this.At, g =
                this.JF; if (!isFinite(g) || 0 >= g)g = NaN; h = this.ND; if (!isFinite(h) || 0 >= h)h = 1; k = this.mh; isFinite(k) || (k = 0); l = this.hi; if (!isFinite(l) || 360 < l || 1 > l)l = 360; m = this.spacing; isFinite(m) || (m = NaN); d === zl && f === Al?d = yl:d === zl && f !== Al && (f = Al, d = this.Qe); if ((this.direction === nl || this.direction === ol) && this.sorting !== ml){for (var r = 0; !(r >= b.length); r += 2){a.add(b.wa(r)); if (r + 1 >= b.length)break; c.add(b.wa(r + 1))}this.direction === nl?(this.Qe === zl && a.reverse(), b = new B(Un), b.Oe(a), b.Oe(c)):(this.Qe === zl && c.reverse(), b = new B(Un),
                b.Oe(c), b.Oe(a))}for (var s = b.length, u = n = 0, r = 0; r < b.length; r++){var p = k + l * u * (this.direction === pl?1: - 1) / s, v = b.wa(r).diameter; isNaN(v) && (v = Vn(b.wa(r), p)); 360 > l && (0 === r || r === b.length - 1) && (v /= 2); n += v; u++}if (isNaN(g) || d === zl){isNaN(m) && (m = 6); if (d !== yl && d !== zl){v = - Infinity; for (r = 0; r < s; r++){var q = b.wa(r), D = b.wa(r === s - 1?0:r + 1); isNaN(q.diameter) && Vn(q, 0); isNaN(D.diameter) && Vn(D, 0); v = Math.max(v, (q.diameter + D.diameter) / 2)}q = v + m; d === rl?(p = 2 * Math.PI / s, g = (v + m) / p):g = Wn(this, q * (360 <= l?s:s - 1), h, k * Math.PI / 180, l * Math.PI /
                180)} else g = Wn(this, n + (360 <= l?s:s - 1) * (d !== zl?m:1.6 * m), h, k * Math.PI / 180, l * Math.PI / 180); p = g * h} else if (p = g * h, u = Xn(this, g, p, k * Math.PI / 180, l * Math.PI / 180), isNaN(m)){if (d === yl || d === zl)m = (u - n) / (360 <= l?s:s - 1)} else if (d === yl || d === zl)r = (u - n) / (360 <= l?s:s - 1), r < m?(g = Wn(this, n + m * (360 <= l?s:s - 1), h, k * Math.PI / 180, l * Math.PI / 180), p = g * h):m = r; else{v = - Infinity; for (r = 0; r < s; r++)q = b.wa(r), D = b.wa(r === s - 1?0:r + 1), isNaN(q.diameter) && Vn(q, 0), isNaN(D.diameter) && Vn(D, 0), v = Math.max(v, (q.diameter + D.diameter) / 2); q = v + m; r = Wn(this, q * (360 <=
                l?s:s - 1), h, k * Math.PI / 180, l * Math.PI / 180); r > g?(g = r, p = g * h):q = u / (360 <= l?s:s - 1)}this.Jy = d; this.fC = f; this.yd = g; this.On = h; this.Ky = k; this.Iq = l; this.Ak = m; this.wD = n; this.qg = p; this.ru = q; c = [b, a, c]; b = c[0]; a = c[1]; c = c[2]; d = this.Jy; f = this.yd; h = this.Ky; k = this.Iq; l = this.Ak; m = this.qg; n = this.ru; if (this.direction !== nl && this.direction !== ol || d !== zl)if (this.direction === nl || this.direction === ol){g = 0; switch (d){case xl:g = 180 * Yn(this, f, m, h, n) / Math.PI; break; case yl:n = b = 0; g = a.$a(); null !== g && (b = Vn(g, Math.PI / 2)); g = c.$a(); null !==
                g && (n = Vn(g, Math.PI / 2)); g = 180 * Yn(this, f, m, h, l + (b + n) / 2) / Math.PI; break; case rl:g = k / b.length}if (this.direction === nl){switch (d){case xl:Zn(this, a, h, ql); break; case yl:$n(this, a, h, ql); break; case rl:ao(this, a, k / 2, h, ql)}switch (d){case xl:Zn(this, c, h + g, pl); break; case yl:$n(this, c, h + g, pl); break; case rl:ao(this, c, k / 2, h + g, pl)}} else{switch (d){case xl:Zn(this, c, h, ql); break; case yl:$n(this, c, h, ql); break; case rl:ao(this, c, k / 2, h, ql)}switch (d){case xl:Zn(this, a, h + g, pl); break; case yl:$n(this, a, h + g, pl); break; case rl:ao(this,
                a, k / 2, h + g, pl)}}} else switch (d){case xl:Zn(this, b, h, this.direction); break; case yl:$n(this, b, h, this.direction); break; case rl:ao(this, b, k, h, this.direction); break; case zl:bo(this, b, k, h, this.direction)} else bo(this, b, k, h - k / 2, pl)}this.updateParts(); this.network = null; this.$e = !0};
        function ao(a, b, c, d, f){var g = a.Iq, h = a.yd; a = a.qg; d = d * Math.PI / 180; c = c * Math.PI / 180; for (var k = b.length, l = 0; l < k; l++){var m = d + (f === pl?l * c / (360 <= g?k:k - 1): - (l * c) / k), n = b.wa(l), p = h * Math.tan(m) / a, p = Math.sqrt((h * h + a * a * p * p) / (1 + p * p)); n.Da = p * Math.cos(m); n.Pa = p * Math.sin(m); n.actualAngle = 180 * m / Math.PI}}
function $n(a, b, c, d){var f = a.yd, g = a.qg, h = a.Ak; c = c * Math.PI / 180; for (var k = b.length, l = 0; l < k; l++){var m = b.wa(l), n = b.wa(l === k - 1?0:l + 1), p = g * Math.sin(c); m.Da = f * Math.cos(c); m.Pa = p; m.actualAngle = 180 * c / Math.PI; isNaN(m.diameter) && Vn(m, 0); isNaN(n.diameter) && Vn(n, 0); m = Yn(a, f, g, d === pl?c: - c, (m.diameter + n.diameter) / 2 + h); c += d === pl?m: - m}}
function Zn(a, b, c, d){var f = a.yd, g = a.qg, h = a.ru; c = c * Math.PI / 180; for (var k = b.length, l = 0; l < k; l++){var m = b.wa(l); m.Da = f * Math.cos(c); m.Pa = g * Math.sin(c); m.actualAngle = 180 * c / Math.PI; m = Yn(a, f, g, d === pl?c: - c, h); c += d === pl?m: - m}}function bo(a, b, c, d, f){var g = a.uu, g = a.Iq; a.jm = 0; a.Tv = new Sn; if (360 > c){for (g = d + (f === pl?g: - g); 0 > g; )g += 360; g %= 360; 180 < g && (g -= 360); g *= Math.PI / 180; a.uu = g; co(a, b, c, d, f)} else eo(a, b, c, d, f); a.Tv.commit(b)}
function eo(a, b, c, d, f){var g = a.yd, h = a.Ak, k = a.On, l = g * Math.cos(d * Math.PI / 180), m = a.qg * Math.sin(d * Math.PI / 180), n = b.Ie(); if (3 === n.length)n[0].Da = g, n[0].Pa = 0, n[1].Da = n[0].Da - n[0].width / 2 - n[1].width / 2 - h, n[1].y = n[0].y, n[2].Da = (n[0].Da + n[1].Da) / 2, n[2].y = n[0].y - n[2].height - h; else if (4 === n.length)n[0].Da = g, n[0].Pa = 0, n[2].Da = - n[0].Da, n[2].Pa = n[0].Pa, n[1].Da = 0, n[1].y = Math.min(n[0].y, n[2].y) - n[1].height - h, n[3].Da = 0, n[3].y = Math.max(n[0].y + n[0].height + h, n[2].y + n[2].height + h); else{for (g = 0; g < n.length; g++){n[g].Da =
        l; n[g].Pa = m; if (g >= n.length - 1)break; var p = fo(a, l, m, n, g, f); p[0] || (p = ho(a, l, m, n, g, f)); l = p[1]; m = p[2]}a.jm++; if (!(23 < a.jm)){var l = n[0].Da, m = n[0].Pa, g = n[n.length - 1].Da, p = n[n.length - 1].Pa, q = Math.abs(l - g) - ((n[0].width + n[n.length - 1].width) / 2 + h), r = Math.abs(m - p) - ((n[0].height + n[n.length - 1].height) / 2 + h), h = 0; 1 > Math.abs(r)?Math.abs(l - g) < (n[0].width + n[n.length - 1].width) / 2 && (h = 0):h = 0 < r?r:1 > Math.abs(q)?0:q; q = !1; q = Math.abs(g) > Math.abs(p)?0 < g !== m > p:0 < p !== l < g; if (q = f === pl?q:!q)h = - Math.abs(h), h = Math.min(h, - n[n.length -
1].width), h = Math.min(h, - n[n.length - 1].height); l = a.Tv; if (0 < h && 0 > l.ip || Math.abs(h) < Math.abs(l.ip) && !(0 > h && 0 < l.ip))for (l.ip = h, l.qn = [], l.Zp = [], m = 0; m < n.length; m++)l.qn[m] = n[m].Ob.x, l.Zp[m] = n[m].Ob.y; 1 < Math.abs(h) && (a.yd = 8 > a.jm?a.yd - h / (2 * Math.PI):5 > n.length && 10 < h?a.yd / 2:a.yd - (0 < h?1.7: - 2.3), a.qg = a.yd * k, eo(a, b, c, d, f))}}}
function co(a, b, c, d, f){for (var g = a.yd, h = a.qg, k = a.On, l = g * Math.cos(d * Math.PI / 180), m = h * Math.sin(d * Math.PI / 180), n = b.Ie(), p = 0; p < n.length; p++){n[p].Da = l; n[p].Pa = m; if (p >= n.length - 1)break; var q = fo(a, l, m, n, p, f); q[0] || (q = ho(a, l, m, n, p, f)); l = q[1]; m = q[2]}a.jm++; if (!(23 < a.jm)){l = Math.atan2(m, l); l = f === pl?a.uu - l:l - a.uu; l = Math.abs(l) < Math.abs(l - 2 * Math.PI)?l:l - 2 * Math.PI; g = l * (g + h) / 2; h = a.Tv; if (Math.abs(g) < Math.abs(h.ip))for (h.ip = g, h.qn = [], h.Zp = [], l = 0; l < n.length; l++)h.qn[l] = n[l].Ob.x, h.Zp[l] = n[l].Ob.y; 1 < Math.abs(g) &&
        (a.yd = 8 > a.jm?a.yd - g / (2 * Math.PI):a.yd - (0 < g?1.7: - 2.3), a.qg = a.yd * k, co(a, b, c, d, f))}}function fo(a, b, c, d, f, g){var h = a.yd, k = a.qg, l = 0, m = 0; a = (d[f].width + d[f + 1].width) / 2 + a.Ak; var n = !1; if (0 <= c !== (g === pl)){if (l = b + a, l > h){l = b - a; if (l < - h)return b = [!1], b[1] = l, b[2] = m, b; n = !0}} else if (l = b - a, l < - h){l = b + a; if (l > h)return b = [!1], b[1] = l, b[2] = m, b; n = !0}m = Math.sqrt(1 - Math.min(1, l * l / (h * h))) * k; 0 > c !== n && (m = - m); b = Math.abs(c - m) > (d[f].height + d[f + 1].height) / 2?[!1]:[!0]; b[1] = l; b[2] = m; return b}
function ho(a, b, c, d, f, g){var h = a.yd, k = a.qg, l = 0, m = 0; a = (d[f].height + d[f + 1].height) / 2 + a.Ak; var n = !1; if (0 <= b !== (g === pl)){if (m = c - a, m < - k){m = c + a; if (m > k)return b = [!1], b[1] = l, b[2] = m, b; n = !0}} else if (m = c + a, m > k){m = c - a; if (m < - k)return b = [!1], b[1] = l, b[2] = m, b; n = !0}l = Math.sqrt(1 - Math.min(1, m * m / (k * k))) * h; 0 > b !== n && (l = - l); b = Math.abs(b - l) > (d[f].width + d[f + 1].width) / 2?[!1]:[!0]; b[1] = l; b[2] = m; return b}function Sn(){this.ip = - Infinity; this.Zp = this.qn = null}
Sn.prototype.commit = function(a){if (null !== this.qn && null !== this.Zp)for (var b = 0; b < this.qn.length; b++){var c = a.wa(b); c.x = this.qn[b]; c.y = this.Zp[b]}}; hl.prototype.commitLayout = function(){this.commitNodes(); this.qt && this.commitLinks()}; hl.prototype.commitNodes = function(){for (var a = this.yH, b = this.network.vertexes.k, c; b.next(); )c = b.value, c.x += a.x, c.y += a.y, c.commit()}; hl.prototype.commitLinks = function(){for (var a = this.network.edges.k; a.next(); )a.value.commit()};
        function Xn(a, b, c, d, f){var g = a.qH; if (0.001 > Math.abs(a.On - 1))return void 0 !== d && void 0 !== f?f * b:2 * Math.PI * b; a = b > c?Math.sqrt(b * b - c * c) / b:Math.sqrt(c * c - b * b) / c; var h = 0, k; k = void 0 !== d && void 0 !== f?f / (g + 1):Math.PI / (2 * (g + 1)); for (var l = 0; l <= g; l++)var m = Math.sin(void 0 !== d && void 0 !== f?d + l * f / g:l * Math.PI / (2 * g)), h = h + Math.sqrt(1 - a * a * m * m) * k; return void 0 !== d && void 0 !== f?(b > c?b:c) * h:4 * (b > c?b:c) * h}function Wn(a, b, c, d, f){a = void 0 !== d && void 0 !== f?Xn(a, 1, c, d, f):Xn(a, 1, c); return b / a}
function Yn(a, b, c, d, f){if (0.001 > Math.abs(a.On - 1))return f / b; var g = b > c?Math.sqrt(b * b - c * c) / b:Math.sqrt(c * c - b * b) / c, h = 0; a = 2 * Math.PI / (700 * a.network.vertexes.count); b > c && (d += Math.PI / 2); for (var k = 0; ; k++){var l = Math.sin(d + k * a), h = h + (b > c?b:c) * Math.sqrt(1 - g * g * l * l) * a; if (h >= f)return k * a}return 0}
hl.prototype.sort = function(a){switch (this.sorting){case kl:break; case ll:a.reverse(); break; case il:a.sort(this.comparer); break; case jl:a.sort(this.comparer); a.reverse(); break; case ml:for (var b = [], c = 0; c < a.length; c++)b.push(0); for (var d = new B(Un), c = 0; c < a.length; c++){var f = - 1, g = - 1; if (0 === c)for (var h = 0; h < a.length; h++){var k = a.wa(h).BI; k > f && (f = k, g = h)} else for (h = 0; h < a.length; h++)k = b[h], k > f && (f = k, g = h); d.add(a.wa(g)); b[g] = - 1; g = a.wa(g); f = g.sc; for (g = g.gc; f.next(); )h = f.value, h = h.fromVertex, h = a.indexOf(h), 0 >
        h || 0 <= b[h] && b[h]++; for (; g.next(); )h = g.value, h = h.toVertex, h = a.indexOf(h), 0 > h || 0 <= b[h] && b[h]++}a = []; for (b = 0; b < d.length; b++){k = d.wa(b); a[b] = []; for (var c = k.gc, f = k.sc, l, m; c.next(); )l = c.value, m = d.indexOf(l.toVertex), m !== b && 0 > a[b].indexOf(m) && a[b].push(m); for (; f.next(); )l = f.value, m = d.indexOf(l.fromVertex), m !== b && 0 > a[b].indexOf(m) && a[b].push(m)}k = []; for (b = 0; b < a.length; b++)k[b] = 0; for (var c = [], n = [], p = [], f = [], g = new B(Un), h = b = 0; b < a.length; b++){var q = a[b].length; if (1 === q)f.push(b); else if (0 === q)g.add(d.wa(b));
        else{if (0 === h)c.push(b); else{for (var r = Infinity, s = Infinity, u = - 1, v = [], q = 0; q < c.length; q++)0 > a[c[q]].indexOf(c[q === c.length - 1?0:q + 1]) && v.push(q === c.length - 1?0:q + 1); if (0 === v.length)for (q = 0; q < c.length; q++)v.push(q); for (q = 0; q < v.length; q++){var D = v[q], A; m = a[b]; l = n; A = p; for (var G = k, L = D, N = c, O = 0, U = 0; U < l.length; U++){var Y = G[l[U]], ba = G[A[U]], R = 0, xa = 0; Y < ba?(R = Y, xa = ba):(R = ba, xa = Y); if (R < L && L <= xa)for (Y = 0; Y < m.length; Y++)ba = m[Y], 0 > N.indexOf(ba) || R < G[ba] && G[ba] < xa || R === G[ba] || xa === G[ba] || O++; else for (Y = 0; Y < m.length; Y++)ba =
                m[Y], 0 > N.indexOf(ba) || R < G[ba] && G[ba] < xa && R !== G[ba] && xa !== G[ba] && O++}A = O; for (l = G = 0; l < a[b].length; l++)m = c.indexOf(a[b][l]), 0 <= m && (m = Math.abs(D - (m >= D?m + 1:m)), G += m < c.length + 1 - m?m:c.length + 1 - m); for (l = 0; l < n.length; l++)m = k[n[l]], L = k[p[l]], m >= D && m++, L >= D && L++, m > L && (N = L, L = m, m = N), L - m < (c.length + 2) / 2 === (m < D && D <= L) && G++; if (A < r || A === r && G < s)r = A, s = G, u = D}c.splice(u, 0, b); for (q = 0; q < c.length; q++)k[c[q]] = q; for (q = 0; q < a[b].length; q++)r = a[b][q], 0 <= c.indexOf(r) && (n.push(b), p.push(r))}h++}}n = !1; for (p = c.length; ; ){n = !0; for (k =
        0; k < f.length; k++)if (b = f[k], q = a[b][0], m = c.indexOf(q), 0 <= m){for (h = s = 0; h < a[q].length; h++)r = a[q][h], r = c.indexOf(r), 0 > r || r === m || (u = r > m?r - m:m - r, s += r < m !== u > p - u?1: - 1); c.splice(0 > s?m:m + 1, 0, b); f.splice(k, 1); k--} else n = !1; if (n)break; else c.push(f[0]), f.splice(0, 1)}for (b = 0; b < c.length; b++)m = c[b], g.add(d.wa(m)); return g; default:t.m("Invalid sorting type.")}return a}; t.g(hl, "radius", hl.prototype.JF);
        t.defineProperty(hl, {JF:"radius"}, function(){return this.Qr}, function(a){this.Qr !== a && (t.i(a, "number", hl, "radius"), 0 < a || isNaN(a)) && (this.Qr = a, this.J())}); t.g(hl, "aspectRatio", hl.prototype.ND); t.defineProperty(hl, {ND:"aspectRatio"}, function(){return this.oq}, function(a){this.oq !== a && (t.i(a, "number", hl, "aspectRatio"), 0 < a && (this.oq = a, this.J()))}); t.g(hl, "startAngle", hl.prototype.mh);
        t.defineProperty(hl, {mh:"startAngle"}, function(){return this.rs}, function(a){this.rs !== a && (t.i(a, "number", hl, "startAngle"), this.rs = a, this.J())}); t.g(hl, "sweepAngle", hl.prototype.hi); t.defineProperty(hl, {hi:"sweepAngle"}, function(){return this.us}, function(a){this.us !== a && (t.i(a, "number", hl, "sweepAngle"), this.us = 0 < a && 360 >= a?a:360, this.J())}); t.g(hl, "arrangement", hl.prototype.Qe);
        t.defineProperty(hl, {Qe:"arrangement"}, function(){return this.bd}, function(a){this.bd !== a && (t.Aa(a, hl, hl, "arrangement"), a === zl || a === yl || a === xl || a === rl) && (this.bd = a, this.J())}); t.g(hl, "direction", hl.prototype.direction); t.defineProperty(hl, {direction:"direction"}, function(){return this.sa}, function(a){this.sa !== a && (t.Aa(a, hl, hl, "direction"), a === pl || a === ql || a === nl || a === ol) && (this.sa = a, this.J())}); t.g(hl, "sorting", hl.prototype.sorting);
        t.defineProperty(hl, {sorting:"sorting"}, function(){return this.Mh}, function(a){this.Mh !== a && (t.Aa(a, hl, hl, "sorting"), a === kl || a === ll || a === il || jl || a === ml) && (this.Mh = a, this.J())}); t.g(hl, "comparer", hl.prototype.comparer); t.defineProperty(hl, {comparer:"comparer"}, function(){return this.th}, function(a){this.th !== a && (t.i(a, "function", hl, "comparer"), this.th = a, this.J())}); t.g(hl, "spacing", hl.prototype.spacing);
        t.defineProperty(hl, {spacing:"spacing"}, function(){return this.Nh}, function(a){this.Nh !== a && (t.i(a, "number", hl, "spacing"), this.Nh = a, this.J())}); t.g(hl, "nodeDiameterFormula", hl.prototype.At); t.defineProperty(hl, {At:"nodeDiameterFormula"}, function(){return this.Hr}, function(a){this.Hr !== a && (t.Aa(a, hl, hl, "nodeDiameterFormula"), a === Bl || a === Al) && (this.Hr = a, this.J())}); t.A(hl, {zH:"actualXRadius"}, function(){return this.yd}); t.A(hl, {AH:"actualYRadius"}, function(){return this.qg});
        t.A(hl, {cK:"actualSpacing"}, function(){return this.Ak}); t.A(hl, {yH:"actualCenter"}, function(){return isNaN(this.Dd.x) || isNaN(this.Dd.y)?new w(0, 0):new w(this.Dd.x + this.zH, this.Dd.y + this.AH)}); var yl; hl.ConstantSpacing = yl = t.w(hl, "ConstantSpacing", 0); var xl; hl.ConstantDistance = xl = t.w(hl, "ConstantDistance", 1); var rl; hl.ConstantAngle = rl = t.w(hl, "ConstantAngle", 2); var zl; hl.Packed = zl = t.w(hl, "Packed", 3); var pl; hl.Clockwise = pl = t.w(hl, "Clockwise", 4); var ql;
        hl.Counterclockwise = ql = t.w(hl, "Counterclockwise", 5); var nl; hl.BidirectionalLeft = nl = t.w(hl, "BidirectionalLeft", 6); var ol; hl.BidirectionalRight = ol = t.w(hl, "BidirectionalRight", 7); var kl; hl.Forwards = kl = t.w(hl, "Forwards", 8); var ll; hl.Reverse = ll = t.w(hl, "Reverse", 9); var il; hl.Ascending = il = t.w(hl, "Ascending", 10); var jl; hl.Descending = jl = t.w(hl, "Descending", 11); var ml; hl.Optimized = ml = t.w(hl, "Optimized", 12); var Bl; hl.Pythagorean = Bl = t.w(hl, "Pythagorean", 13); var Al; hl.Circular = Al = t.w(hl, "Circular", 14);
        function Tn(){ra.call(this)}t.ga("CircularNetwork", Tn); t.Ka(Tn, ra); Tn.prototype.createVertex = function(){return new Un}; Tn.prototype.createEdge = function(){return new io}; function Un(){ta.call(this); this.actualAngle = this.diameter = NaN}t.ga("CircularVertex", Un); t.Ka(Un, ta);
        function Vn(a, b){var c = a.network; if (null === c)return NaN; c = c.jc; if (null === c)return NaN; if (c.Qe === zl)if (c.At === Al)a.diameter = Math.max(a.width, a.height); else{var c = Math.abs(Math.sin(b)), d = Math.abs(Math.cos(b)); if (0 === c)return a.width; if (0 === d)return a.height; a.diameter = Math.min(a.height / c, a.width / d)} else a.diameter = c.At === Al?Math.max(a.width, a.height):Math.sqrt(a.width * a.width + a.height * a.height); return a.diameter}function io(){ua.call(this)}t.ga("CircularEdge", io); t.Ka(io, ua);
        function jo(){0 < arguments.length && t.$c(jo); ce.call(this); this.pg = null; this.hr = 0; this.Zf = (new ga(100, 100)).freeze(); this.nq = !1; this.Lh = !0; this.sh = !1; this.po = 100; this.Kq = 1; this.Fh = 1E3; this.In = 0.05; this.Hn = 50; this.En = 150; this.Gn = 0; this.Eq = 10; this.Dq = 5}t.ga("ForceDirectedLayout", jo); t.Ka(jo, ce);
        jo.prototype.cloneProtected = function(a){ce.prototype.cloneProtected.call(this, a); a.Zf.assign(this.Zf); a.nq = this.nq; a.Lh = this.Lh; a.sh = this.sh; a.po = this.po; a.Kq = this.Kq; a.Fh = this.Fh; a.In = this.In; a.Hn = this.Hn; a.En = this.En; a.Gn = this.Gn; a.Eq = this.Eq; a.Dq = this.Dq}; jo.prototype.createNetwork = function(){var a = new lo; Kn(a, this); return a};
        jo.prototype.doLayout = function(a){a || t.m("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts"); null === this.network && (this.network = this.makeNetwork(a)); a = this.Zw; if (0 < this.network.vertexes.count){this.network.tw(); for (var b = this.network.vertexes.k; b.next(); ){var c = b.value; c.charge = this.electricalCharge(c); c.mass = this.gravitationalMass(c)}for (b = this.network.edges.k; b.next(); )c = b.value, c.stiffness = this.springStiffness(c), c.length = this.springLength(c);
                this.Mz(); this.hr = 0; if (this.needsClusterLayout()){for (var b = this.network, d = b.SJ().k; d.next(); ){var f = d.value; this.network = f; for (c = this.network.vertexes.k; c.next(); ){for (var f = c.value, g = 0, h = f.vertexes; h.next(); )g++; f.Tf = g; f.fk = 1; f.Gm = null; f.kh = null}mo(this, 0, a)}this.network = b; d.reset(); e && t.l(b, lo, jo, "arrangeConnectedGraphs:singletons"); for (var c = this.aw, k = d.count, l = !0, g = f = 0, h = t.Cb(), m = 0; m < k + b.vertexes.count + 2; m++)h[m] = null; k = 0; d.reset(); for (m = t.Df(); d.next(); ){var n = d.value; this.pf(n, m); if (l)l = !1,
                f = m.x + m.width / 2, g = m.y + m.height / 2, h[0] = new w(m.x + m.width + c.width, m.y), h[1] = new w(m.x, m.y + m.height + c.height), k = 2; else{var p = no(h, k, f, g, m.width, m.height, c), q = h[p], r = new w(q.x + m.width + c.width, q.y), s = new w(q.x, q.y + m.height + c.height); p + 1 < k && h.splice(p + 1, 0, null); h[p] = r; h[p + 1] = s; k++; p = q.x - m.x; q = q.y - m.y; for (n = n.vertexes.k; n.next(); ){var u = n.value; u.Da += p; u.Pa += q}}}t.hc(m); for (n = b.vertexes.k; n.next(); )u = n.value, l = u.T, 2 > k?(f = l.x + l.width / 2, g = l.y + l.height / 2, h[0] = new w(l.x + l.width + c.width, l.y), h[1] = new w(l.x, l.y +
                l.height + c.height), k = 2):(p = no(h, k, f, g, l.width, l.height, c), q = h[p], r = new w(q.x + l.width + c.width, q.y), s = new w(q.x, q.y + l.height + c.height), p + 1 < k && h.splice(p + 1, 0, null), h[p] = r, h[p + 1] = s, k++, u.Da = q.x + u.width / 2, u.Pa = q.y + u.height / 2); t.ya(h); for (d.reset(); d.next(); ){f = d.value; for (g = f.vertexes.k; g.next(); )c = g.value, b.Xk(c); for (f = f.edges.k; f.next(); )c = f.value, b.Jo(c)}}oo(this, a); this.updateParts()}this.po = a; this.network = null; this.$e = !0};
        jo.prototype.needsClusterLayout = function(){if (3 > this.network.vertexes.count)return!1; var a = 0, b = 0, c = this.network.vertexes.k; c.next(); for (var d = c.value.T; c.next(); ){if (c.value.T.Qf(d) && (a++, 1 < a))return!0; if (10 < b)break; b++}return!1}; jo.prototype.pf = function(a, b){for (var c = !0, d = a.vertexes.k; d.next(); ){var f = d.value; c?(c = !1, b.set(f.T)):b.kj(f.T)}return b};
        function po(a, b, c){e && (t.q(b, jo, "computeClusterLayoutIterations:level"), t.q(c, jo, "computeClusterLayoutIterations:maxiter")); return Math.max(Math.min(a.network.vertexes.count, c * (b + 1) / 11), 10)}
function mo(a, b, c){e && (t.q(b, jo, "layoutClusters:level"), t.q(c, jo, "layoutClusters:maxiter")); if (qo(a, b)){var d = a.Fh; a.Fh *= 1 + 1 / (b + 1); var f = ro(a, b), g = Math.max(0, po(a, b, c)); a.Zw += g; mo(a, b + 1, c); oo(a, g); so(a, f, b); c = a.pg; null === c?c = new B(to):c.clear(); c.Oe(f.vertexes); c.sort(function(a, b){return null === a || null === b || a === b?0:b.Tf - a.Tf}); for (f = c.k; f.next(); )uo(a, f.value, b); a.Fh = d}}
function qo(a, b){e && t.q(b, jo, "hasClusters:level"); if (10 < b || 3 > a.network.vertexes.count)return!1; null === a.pg?a.pg = new B(to):a.pg.clear(); a.pg.Oe(a.network.vertexes); var c = a.pg; c.sort(function(a, b){return null === a || null === b || a === b?0:b.Tf - a.Tf}); for (var d = c.count - 1; 0 <= d && 1 >= c.n[d].Tf; )d--; return 1 < c.count - d}
function ro(a, b){e && t.q(b, jo, "pushSubNetwork:level"); for (var c = a.network, d = new lo, f = a.pg.k; f.next(); ){var g = f.value; if (1 < g.Tf){d.Xk(g); var h = {wB:g.Tf, yB:g.width, vB:g.height, YG:g.O.x, ZG:g.O.y}; null === g.kh && (g.kh = new B); g.kh.add(h); g.YA = g.kh.count - 1} else break}for (var k = c.edges.k; k.next(); ){var l = k.value; if (l.fromVertex.network === d && l.toVertex.network === d)d.Jo(l); else if (l.fromVertex.network === d){var m = l.fromVertex.Gm; null === m && (m = new B(to), l.fromVertex.Gm = m); m.add(l.toVertex); l.fromVertex.Tf--; l.fromVertex.fk +=
        l.toVertex.fk} else l.toVertex.network === d && (m = l.toVertex.Gm, null === m && (m = new B(to), l.toVertex.Gm = m), m.add(l.fromVertex), l.toVertex.Tf--, l.toVertex.fk += l.fromVertex.fk)}for (k = d.edges.k; k.next(); )l = k.value, l.length *= Math.max(1, H.sqrt((l.fromVertex.fk + l.toVertex.fk) / (4 * b + 1))); for (f = d.vertexes.k; f.next(); )if (g = f.value, m = g.Gm, null !== m && 0 < m.count && (h = g.kh.n[g.kh.count - 1], h = h.wB - g.Tf, !(0 >= h))){for (var n = 0, p = 0, q = m.count - h; q < m.count; q++){for (var r = m.n[q], l = null, k = r.edges.k; k.next(); ){var s = k.value; if (s.GI(r) ===
        g){l = s; break}}null !== l && (p += l.length, n += r.width * r.height)}m = g.Da; k = g.Pa; l = g.width; q = g.height; r = g.O; s = l * q; 1 > s && (s = 1); n = H.sqrt((n + s + p * p * 4 / (h * h)) / s); h = (n - 1) * l / 2; n = (n - 1) * q / 2; g.Ob = new x(m - r.x - h, k - r.y - n, l + 2 * h, q + 2 * n); g.focus = new w(r.x + h, r.y + n)}a.network = d; return c}
function so(a, b, c){e && (t.l(b, lo, jo, "popNetwork:oldnet"), t.q(c, jo, "popNetwork:level")); for (c = a.network.vertexes.k; c.next(); ){var d = c.value; d.network = b; if (null !== d.kh){var f = d.kh.n[d.YA]; d.Tf = f.wB; var g = f.YG, h = f.ZG; d.Ob = new x(d.Da - g, d.Pa - h, f.yB, f.vB); d.focus = new w(g, h); d.YA--}}for (c = a.network.edges.k; c.next(); )c.value.network = b; a.network = b}
function uo(a, b, c){e && (t.l(b, to, jo, "surroundNode:oldnet"), t.q(c, jo, "surroundNode:level")); var d = b.Gm; if (null !== d && 0 !== d.count){c = b.Da; var f = b.Pa, g = b.width, h = b.height; null !== b.kh && 0 < b.kh.count && (h = b.kh.n[0], g = h.yB, h = h.vB); for (var g = H.sqrt(g * g + h * h) / 2, k = !1, l = h = 0, m = 0, n = b.vertexes.k; n.next(); ){var p = n.value; 1 >= p.Tf?l++:(k = !0, m++, h += Math.atan2(b.Pa - p.Pa, b.Da - p.Da))}if (0 !== l)for (0 < m && (h /= m), m = b = 0, b = k?2 * Math.PI / (l + 1):2 * Math.PI / l, 0 === l % 2 && (m = b / 2), 1 < d.count && d.sort(function(a, b){return null === a || null === b ||
        a === b?0:b.width * b.height - a.width * a.height}), k = 0 === l % 2?0:1, n = d.k; n.next(); )if (p = n.value, !(1 < p.Tf || a.isFixed(p))){d = null; for (l = p.edges.k; l.next(); ){d = l.value; break}var l = p.width, q = p.height, l = H.sqrt(l * l + q * q) / 2, d = g + d.length + l, l = h + (b * (k / 2 >> 1) + m) * (0 === k % 2?1: - 1); p.Da = c + d * Math.cos(l); p.Pa = f + d * Math.sin(l); k++}}}
function no(a, b, c, d, f, g, h){var k = 9E19, l = - 1, m = 0; a:for (; m < b; m++){var n = a[m], p = n.x - c, q = n.y - d, p = p * p + q * q; if (p < k){for (q = m - 1; 0 <= q; q--)if (a[q].y > n.y && a[q].x - n.x < f + h.width)continue a; for (q = m + 1; q < b; q++)if (a[q].x > n.x && a[q].y - n.y < g + h.height)continue a; l = m; k = p}}return l}jo.prototype.Mz = function(){if (this.comments)for (var a = this.network.vertexes.k; a.next(); )this.addComments(a.value)};
        jo.prototype.addComments = function(a){var b = a.Fc; if (null !== b)for (b = b.zE(); b.next(); ){var c = b.value; if ("Comment" === c.Wc && c.Sa()){var d = this.network.Qm(c); null === d && (d = this.network.Ko(c)); d.charge = this.jE; for (var c = null, f = d.gc; f.next(); )if (f.value.toVertex === a){c = f.value; break}if (null === c)for (f = d.sc; f.next(); )if (f.value.fromVertex === a){c = f.value; break}null === c && (c = this.network.$m(a, d, null)); c.length = this.kE}}};
        function vo(a, b){e && (t.l(a, to, jo, "getNodeDistance:vertexA"), t.l(b, to, jo, "getNodeDistance:vertexB")); var c = a.T, d = c.x, f = c.y, g = c.width, c = c.height, h = b.T, k = h.x, l = h.y, m = h.width, h = h.height; return d + g < k?f > l + h?(d = d + g - k, f = f - l - h, H.sqrt(d * d + f * f)):f + c < l?(d = d + g - k, f = f + c - l, H.sqrt(d * d + f * f)):k - (d + g):d > k + m?f > l + h?(d = d - k - m, f = f - l - h, H.sqrt(d * d + f * f)):f + c < l?(d = d - k - m, f = f + c - l, H.sqrt(d * d + f * f)):d - (k + m):f > l + h?f - (l + h):f + c < l?l - (f + c):0.1}
function oo(a, b){e && t.q(b, jo, "performIterations:num"); a.pg = null; for (var c = a.hr + b; a.hr < c && (a.hr++, wo(a)); ); a.pg = null}
function wo(a){null === a.pg && (a.pg = new B(to), a.pg.Oe(a.network.vertexes)); var b = a.pg.n; if (0 >= b.length)return!1; var c = b[0]; c.forceX = 0; c.forceY = 0; for (var d = c.Da, f = d, g = c.Pa, h = g, c = 1; c < b.length; c++){var k = b[c]; k.forceX = 0; k.forceY = 0; var l = k.Da, k = k.Pa, d = Math.min(d, l), f = Math.max(f, l), g = Math.min(g, k), h = Math.max(h, k)}(g = f - d > h - g)?b.sort(function(a, b){return null === a || null === b || a === b?0:a.Da - b.Da}):b.sort(function(a, b){return null === a || null === b || a === b?0:a.Pa - b.Pa}); for (var h = a.Fh, m = 0, n = 0, p = 0, c = 0; c < b.length; c++){var k =
        b[c], l = k.T, q = k.O, d = l.x + q.x, l = l.y + q.y, n = k.charge * a.electricalFieldX(d, l), p = k.charge * a.electricalFieldY(d, l), n = n + k.mass * a.gravitationalFieldX(d, l), p = p + k.mass * a.gravitationalFieldY(d, l); k.forceX += n; k.forceY += p; for (q = c + 1; q < b.length; q++)if (f = b[q], f !== k){var n = f.T, r = f.O, p = n.x + r.x, r = n.y + r.y; if (d - p > h || p - d > h){if (g)break} else if (l - r > h || r - l > h){if (!g)break} else{var s = vo(k, f); 1 > s?(d > p?(n = Math.abs(f.T.right - k.T.x), n = (1 + n) * Math.random()):d < p?(n = Math.abs(f.T.x - k.T.right), n = - (1 + n) * Math.random()):(n = Math.max(f.width,
        k.width), n = (1 + n) * Math.random() - n / 2), l > r?(p = Math.abs(f.T.bottom - k.T.y), p = (1 + p) * Math.random()):d < p?(p = Math.abs(f.T.y - k.T.bottom), p = - (1 + p) * Math.random()):(p = Math.max(f.height, k.height), p = (1 + p) * Math.random() - p / 2)):(m = - (k.charge * f.charge) / (s * s), n = (p - d) / s * m, p = (r - l) / s * m); k.forceX += n; k.forceY += p; f.forceX -= n; f.forceY -= p}}}for (c = a.network.edges.k; c.next(); )g = c.value, k = g.fromVertex, f = g.toVertex, l = k.T, q = k.O, d = l.x + q.x, l = l.y + q.y, n = f.T, r = f.O, p = n.x + r.x, r = n.y + r.y, s = vo(k, f), 1 > s?(n = (d > p?1: - 1) * (1 + (f.width > k.width)?f.width:
        k.width) * Math.random(), p = (l > r?1: - 1) * (1 + (f.height > k.height)?f.height:k.height) * Math.random()):(m = g.stiffness * (s - g.length), n = (p - d) / s * m, p = (r - l) / s * m), k.forceX += n, k.forceY += p, f.forceX -= n, f.forceY -= p; c = 0; d = Math.max(a.Fh / 20, 50); for (f = 0; f < b.length; f++)k = b[f], a.isFixed(k)?a.moveFixedVertex(k):(g = k.forceX, h = k.forceY, g < - d?g = - d:g > d && (g = d), h < - d?h = - d:h > d && (h = d), k.Da += g, k.Pa += h, c = Math.max(c, g * g + h * h)); return c > a.bA * a.bA}jo.prototype.moveFixedVertex = function(){};
        jo.prototype.commitLayout = function(){this.cB(); this.commitNodes(); this.qt && this.commitLinks()}; jo.prototype.cB = function(){if (this.xl)for (var a = this.network.edges.k; a.next(); ){var b = a.value.link; null !== b && (b.pb = xb, b.tb = xb)}}; jo.prototype.commitNodes = function(){var a = 0, b = 0; if (this.LD){var c = t.Df(); this.pf(this.network, c); b = this.Dd; a = b.x - c.x; b = b.y - c.y; t.hc(c)}for (var c = t.Df(), d = this.network.vertexes.k; d.next(); ){var f = d.value; if (0 !== a || 0 !== b)c.assign(f.T), c.x += a, c.y += b, f.Ob = c; f.commit()}t.hc(c)};
        jo.prototype.commitLinks = function(){for (var a = this.network.edges.k; a.next(); )a.value.commit()}; jo.prototype.springStiffness = function(a){a = a.stiffness; return isNaN(a)?this.In:a}; jo.prototype.springLength = function(a){a = a.length; return isNaN(a)?this.Hn:a}; jo.prototype.electricalCharge = function(a){a = a.charge; return isNaN(a)?this.En:a}; jo.prototype.electricalFieldX = function(){return 0}; jo.prototype.electricalFieldY = function(){return 0};
        jo.prototype.gravitationalMass = function(a){a = a.mass; return isNaN(a)?this.Gn:a}; jo.prototype.gravitationalFieldX = function(){return 0}; jo.prototype.gravitationalFieldY = function(){return 0}; jo.prototype.isFixed = function(a){return a.isFixed}; t.A(jo, {eK:"currentIteration"}, function(){return this.hr}); t.g(jo, "arrangementSpacing", jo.prototype.aw); t.defineProperty(jo, {aw:"arrangementSpacing"}, function(){return this.Zf}, function(a){t.l(a, ga, jo, "arrangementSpacing"); this.Zf.M(a) || (this.Zf.assign(a), this.J())});
        t.g(jo, "arrangesToOrigin", jo.prototype.LD); t.defineProperty(jo, {LD:"arrangesToOrigin"}, function(){return this.nq}, function(a){this.nq !== a && (t.i(a, "boolean", jo, "arrangesToOrigin"), this.nq = a, this.J())}); t.g(jo, "setsPortSpots", jo.prototype.xl); t.defineProperty(jo, {xl:"setsPortSpots"}, function(){return this.Lh}, function(a){this.Lh !== a && (t.i(a, "boolean", jo, "setsPortSpots"), this.Lh = a, this.J())}); t.g(jo, "comments", jo.prototype.comments);
        t.defineProperty(jo, {comments:"comments"}, function(){return this.sh}, function(a){this.sh !== a && (t.i(a, "boolean", jo, "comments"), this.sh = a, this.J())}); t.g(jo, "maxIterations", jo.prototype.Zw); t.defineProperty(jo, {Zw:"maxIterations"}, function(){return this.po}, function(a){this.po !== a && (t.i(a, "number", jo, "maxIterations"), 0 <= a && (this.po = a, this.J()))}); t.g(jo, "epsilonDistance", jo.prototype.bA);
        t.defineProperty(jo, {bA:"epsilonDistance"}, function(){return this.Kq}, function(a){this.Kq !== a && (t.i(a, "number", jo, "epsilonDistance"), 0 < a && (this.Kq = a, this.J()))}); t.g(jo, "infinityDistance", jo.prototype.OI); t.defineProperty(jo, {OI:"infinityDistance"}, function(){return this.Fh}, function(a){this.Fh !== a && (t.i(a, "number", jo, "infinityDistance"), 1 < a && (this.Fh = a, this.J()))}); t.g(jo, "defaultSpringStiffness", jo.prototype.uI);
        t.defineProperty(jo, {uI:"defaultSpringStiffness"}, function(){return this.In}, function(a){this.In !== a && (t.i(a, "number", jo, "defaultSpringStiffness"), this.In = a, this.J())}); t.g(jo, "defaultSpringLength", jo.prototype.tI); t.defineProperty(jo, {tI:"defaultSpringLength"}, function(){return this.Hn}, function(a){this.Hn !== a && (t.i(a, "number", jo, "defaultSpringLength"), this.Hn = a, this.J())}); t.g(jo, "defaultElectricalCharge", jo.prototype.nI);
        t.defineProperty(jo, {nI:"defaultElectricalCharge"}, function(){return this.En}, function(a){this.En !== a && (t.i(a, "number", jo, "defaultElectricalCharge"), this.En = a, this.J())}); t.g(jo, "defaultGravitationalMass", jo.prototype.oI); t.defineProperty(jo, {oI:"defaultGravitationalMass"}, function(){return this.Gn}, function(a){this.Gn !== a && (t.i(a, "number", jo, "defaultGravitationalMass"), this.Gn = a, this.J())}); t.g(jo, "defaultCommentSpringLength", jo.prototype.kE);
        t.defineProperty(jo, {kE:"defaultCommentSpringLength"}, function(){return this.Eq}, function(a){this.Eq !== a && (t.i(a, "number", jo, "defaultCommentSpringLength"), this.Eq = a, this.J())}); t.g(jo, "defaultCommentElectricalCharge", jo.prototype.jE); t.defineProperty(jo, {jE:"defaultCommentElectricalCharge"}, function(){return this.Dq}, function(a){this.Dq !== a && (t.i(a, "number", jo, "defaultCommentElectricalCharge"), this.Dq = a, this.J())}); function lo(){ra.call(this)}t.ga("ForceDirectedNetwork", lo); t.Ka(lo, ra);
        lo.prototype.createVertex = function(){return new to}; lo.prototype.createEdge = function(){return new xo}; function to(){ta.call(this); this.isFixed = !1; this.mass = this.charge = NaN; this.fk = this.Tf = this.forceY = this.forceX = 0; this.kh = this.Gm = null; this.YA = 0}t.ga("ForceDirectedVertex", to); t.Ka(to, ta); function xo(){ua.call(this); this.length = this.stiffness = NaN}t.ga("ForceDirectedEdge", xo); t.Ka(xo, ua);
        function Z(){0 < arguments.length && t.$c(Z); ce.call(this); this.xd = this.am = 25; this.sa = 0; this.Dn = yo; this.no = zo; this.Zn = Ao; this.Yl = 4; this.vn = Bo; this.Gi = Co; this.Lh = !0; this.yj = 4; this.Ib = this.$u = this.lb = - 1; this.Hf = this.yr = 0; this.Nb = this.Gf = this.fg = this.Ug = this.Md = null; this.Er = 0; this.iv = this.fm = null; this.ig = 0; this.Fr = null; this.Xg = []; this.Xg.length = 100}t.ga("LayeredDigraphLayout", Z); t.Ka(Z, ce);
        Z.prototype.cloneProtected = function(a){ce.prototype.cloneProtected.call(this, a); a.am = this.am; a.xd = this.xd; a.sa = this.sa; a.Dn = this.Dn; a.no = this.no; a.Zn = this.Zn; a.Yl = this.Yl; a.vn = this.vn; a.Gi = this.Gi; a.Lh = this.Lh; a.yj = this.yj}; Z.prototype.createNetwork = function(){var a = new Do; Kn(a, this); return a};
        Z.prototype.doLayout = function(a){a || t.m("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts"); null === this.network && (this.network = this.makeNetwork(a)); this.Dd = this.initialOrigin(this.Dd); this.$u = - 1; this.Hf = this.yr = 0; this.Fr = this.iv = this.fm = null; for (a = 0; a < this.Xg.length; a++)this.Xg[a] = null; if (0 < this.network.vertexes.count){this.network.tw(); for (a = this.network.edges.k; a.next(); )a.value.rev = !1; switch (this.Dn){default:case Eo:var b = 0, c = this.network.vertexes.count -
                1; a = []; a.length = c + 1; for (var d = this.network.vertexes.k; d.next(); )d.value.valid = !0; for (; null !== No(this.network); ){for (d = Ro(this.network); null !== d; )a[c] = d, c--, d.valid = !1, d = Ro(this.network); for (d = So(this.network); null !== d; )a[b] = d, b++, d.valid = !1, d = So(this.network); for (var d = null, f = 0, g = this.network.vertexes.k; g.next(); ){var h = g.value; if (h.valid){for (var k = 0, l = h.gc; l.next(); )l.value.toVertex.valid && k++; for (var l = 0, m = h.sc; m.next(); )m.value.fromVertex.valid && l++; if (null === d || f < k - l)d = h, f = k - l}}null !== d && (a[b] =
                d, b++, d.valid = !1)}for (b = 0; b < this.network.vertexes.count; b++)a[b].index = b; for (a = this.network.edges.k; a.next(); )b = a.value, b.fromVertex.index > b.toVertex.index && (this.network.kx(b), b.rev = !0); break; case yo:for (b = this.network.vertexes.k; b.next(); )b.value.Zo = - 1, b.value.finish = - 1; for (a = this.network.edges.k; a.next(); )a.value.forest = !1; this.Er = 0; for (b.reset(); b.next(); )0 === b.value.sc.count && To(this, b.value); for (b.reset(); b.next(); ) - 1 === b.value.Zo && To(this, b.value); for (a.reset(); a.next(); )b = a.value, b.forest ||
                (c = b.fromVertex, d = c.finish, f = b.toVertex, g = f.finish, f.Zo < c.Zo && d < g && (this.network.kx(b), b.rev = !0))}for (a = this.network.vertexes.k; a.next(); )b = a.value, b.layer = - 1; this.lb = - 1; this.assignLayers(); for (a.reset(); a.next(); )this.lb = Math.max(this.lb, a.value.layer); c = this.network.edges.k; for (b = []; c.next(); )a = c.value, a.valid = !1, b.push(a); for (c = 0; c < b.length; c++)if (a = b[c], !a.valid && (null !== a.fromVertex.rd && null !== a.toVertex.rd || a.fromVertex.layer !== a.toVertex.layer)){g = k = h = l = 0; f = a.fromVertex; d = a.toVertex; if (null !==
                a.link){k = a.link; if (null === k)continue; var n = f.rd, g = d.rd; if (null === n || null === g)continue; var p = k.aa, h = k.ca, q = k.ud, l = k.de; a.rev && (k = p, m = q, p = h, q = l, h = k, l = m); var r = f.O, k = a.toVertex.O, s = a.rev?d.T:f.T, m = t.K(); isNaN(s.x)?m.assign(r):ym(p, q, Kb, m); n !== p && !isNaN(s.x) && p.Sa() && (n = f.T, isNaN(n.x) || (m.x += s.x - n.x, m.y += s.y - n.y)); p = a.rev?f.T:d.T; n = t.K(); isNaN(p.x)?n.assign(k):ym(h, l, Kb, n); g !== h && !isNaN(p.x) && h.Sa() && (g = d.T, isNaN(g.x) || (n.x += p.x - g.x, n.y += p.y - g.y)); 90 === this.sa || 270 === this.sa?(g = Math.round((m.x - r.x) /
                this.xd), h = m.x, k = Math.round((n.x - k.x) / this.xd), l = n.x):(g = Math.round((m.y - r.y) / this.xd), h = m.y, k = Math.round((n.y - k.y) / this.xd), l = n.y); t.B(m); t.B(n); a.portFromColOffset = g; a.portFromPos = h; a.portToColOffset = k; a.portToPos = l} else a.portFromColOffset = 0, a.portFromPos = 0, a.portToColOffset = 0, a.portToPos = 0; m = f.layer; r = d.layer; n = a; p = 0; s = n.link; if (null !== s){var u = s.ud, v = s.de; if (null !== u && null !== v){var D = s.aa, q = s.ca; if (null !== D && null !== q){var A = u.pb, G = v.tb; this.xl || (s.pb.Nc() || (A = s.pb), s.tb.Nc() || (G = s.tb)); if (A.Nc() ||
                A === wb)A = Uo(this, !0); if (G.Nc() || G === wb)G = Uo(this, !1); var L = s.ic, N = s.getLinkPoint(D, u, A, !0, L, q, v, t.K()), A = s.getLinkDirection(D, u, N, A, !0, L, q, v); t.B(N); A === Vo(this, n, !0)?p += 1:this.xl && null !== D && 1 === D.ports.count && n.rev && (p += 1); N = s.getLinkPoint(q, v, G, !1, L, D, u, t.K()); s = s.getLinkDirection(q, v, N, G, !1, L, D, u); t.B(N); s === Vo(this, n, !1)?p += 2:this.xl && null !== q && 1 === q.ports.count && n.rev && (p += 2)}}}n = 1 === p || 3 === p?!0:!1; if (p = 2 === p || 3 === p?!0:!1)q = this.network.createVertex(), q.rd = null, q.Bm = 1, q.layer = m, q.near = f, this.network.Xk(q),
                f = this.network.$m(f, q, a.link), f.valid = !1, f.rev = a.rev, f.portFromColOffset = g, f.portToColOffset = 0, f.portFromPos = h, f.portToPos = 0, f = q; s = 1; n && s--; if (m - r > s && 0 < m){a.valid = !1; q = this.network.createVertex(); q.rd = null; q.Bm = 2; q.layer = m - 1; this.network.Xk(q); f = this.network.$m(f, q, a.link); f.valid = !0; f.rev = a.rev; f.portFromColOffset = p?0:g; f.portToColOffset = 0; f.portFromPos = p?0:h; f.portToPos = 0; f = q; for (m--; m - r > s && 0 < m; )q = this.network.createVertex(), q.rd = null, q.Bm = 3, q.layer = m - 1, this.network.Xk(q), f = this.network.$m(f, q,
                a.link), f.valid = !0, f.rev = a.rev, f.portFromColOffset = 0, f.portToColOffset = 0, f.portFromPos = 0, f.portToPos = 0, f = q, m--; f = this.network.$m(q, d, a.link); f.valid = !n; n && (q.near = d); f.rev = a.rev; f.portFromColOffset = 0; f.portToColOffset = k; f.portFromPos = 0; f.portToPos = l} else a.valid = !0}b = this.Md = []; for (c = 0; c <= this.lb; c++)b[c] = 0; for (a = this.network.vertexes.k; a.next(); )a.value.index = - 1; this.initializeIndices(); this.$u = - 1; for (c = this.Hf = this.yr = 0; c <= this.lb; c++)b[c] > b[this.Hf] && (this.$u = b[c] - 1, this.Hf = c), b[c] < b[this.yr] &&
                (this.yr = c); this.Fr = []; for (c = 0; c < b.length; c++)this.Fr[c] = []; for (a.reset(); a.next(); )c = a.value, b = c.layer, this.Fr[b][c.index] = c; this.Ib = - 1; for (a = 0; a <= this.lb; a++){b = Wo(this, a); c = 0; d = this.Md[a]; for (f = 0; f < d; f++)g = b[f], c += this.nodeMinColumnSpace(g, !0), g.column = c, c += 1, c += this.nodeMinColumnSpace(g, !1); this.Ib = Math.max(this.Ib, c - 1); Xo(this, a, b)}this.reduceCrossings(); this.straightenAndPack(); this.updateParts()}this.network = null; this.$e = !0};
        Z.prototype.linkMinLength = function(a){var b = a.toVertex, c = 0; for (a = a.fromVertex.gc; a.next(); )a.value.toVertex === b && c++; return 1 < c?2:1}; function Yo(a){var b = a.fromVertex.rd; a = a.toVertex.rd; return null === b && null === a?8:null === b || null === a?4:1}Z.prototype.nodeMinLayerSpace = function(a, b){return null === a.rd?0:90 === this.sa || 270 === this.sa?b?a.O.y + 10:a.T.height - a.O.y + 10:b?a.O.x + 10:a.T.width - a.O.x + 10};
        Z.prototype.nodeMinColumnSpace = function(a, b){if (null === a.rd)return 0; var c = b?a.IA:a.HA; if (void 0 !== c)return c; c = this.sa; return 90 === c || 270 === c?b?a.IA = a.O.x / this.xd + 1 | 0:a.HA = (a.T.width - a.O.x) / this.xd + 1 | 0:b?a.IA = a.O.y / this.xd + 1 | 0:a.HA = (a.T.height - a.O.y) / this.xd + 1 | 0}; function Zo(a){null === a.fm && (a.fm = []); for (var b = 0, c = a.network.vertexes.k, d; c.next(); )d = c.value, a.fm[b] = d.layer, b++, a.fm[b] = d.column, b++, a.fm[b] = d.index, b++; return a.fm}
function $o(a, b){for (var c = 0, d = a.network.vertexes.k, f; d.next(); )f = d.value, f.layer = b[c], c++, f.column = b[c], c++, f.index = b[c], c++}
function ap(a, b, c){e && (t.q(b, Z, "crossingMatrix:unfixedLayer"), t.q(c, Z, "crossingMatrix:direction")); var d = Wo(a, b), f = a.Md[b]; a.iv || (a.iv = []); for (var g = a.iv, h, k = 0; k < f; k++){h = 0; var l = d[k], m = l.near, n, p; if (null !== m && m.layer === l.layer)if (l = m.index, l > k)for (p = k + 1; p < l; p++)n = d[p], n.near === m && n.Bm === m.Bm || h++; else for (p = k - 1; p > l; p--)n = d[p], n.near === m && n.Bm === m.Bm || h++; var q, r, s, u, v, D; if (0 <= c)for (l = d[k].ef, m = 0; m < l.count; m++)if (q = l.n[m], q.valid && q.fromVertex.layer !== b)for (n = q.fromVertex.index, p = q.portToPos, q = q.portFromPos,
        r = m + 1; r < l.count; r++)s = l.n[r], s.valid && s.fromVertex.layer !== b && (u = s.fromVertex.index, v = s.portToPos, s = s.portFromPos, p < v && (n > u || n === u && q > s) && h++, v < p && (u > n || u === n && s > q) && h++); if (0 >= c)for (l = d[k].Te, m = 0; m < l.count; m++)if (q = l.n[m], q.valid && q.toVertex.layer !== b)for (n = q.toVertex.index, p = q.portToPos, q = q.portFromPos, r = m + 1; r < l.count; r++)s = l.n[r], s.valid && s.toVertex.layer !== b && (u = s.toVertex.index, v = s.portToPos, s = s.portFromPos, q < s && (n > u || n === u && p > v) && h++, s < q && (u > n || u === n && v > p) && h++); g[k * f + k] = h; for (l = k + 1; l < f; l++){var A =
        0, G = 0; if (0 <= c)for (h = d[k].ef, D = d[l].ef, m = 0; m < h.count; m++)if (q = h.n[m], q.valid && q.fromVertex.layer !== b)for (n = q.fromVertex.index, q = q.portFromPos, r = 0; r < D.count; r++)s = D.n[r], s.valid && s.fromVertex.layer !== b && (u = s.fromVertex.index, s = s.portFromPos, (n < u || n === u && q < s) && G++, (u < n || u === n && s < q) && A++); if (0 >= c)for (h = d[k].Te, D = d[l].Te, m = 0; m < h.count; m++)if (q = h.n[m], q.valid && q.toVertex.layer !== b)for (n = q.toVertex.index, p = q.portToPos, r = 0; r < D.count; r++)s = D.n[r], s.valid && s.toVertex.layer !== b && (u = s.toVertex.index, v = s.portToPos,
        (n < u || n === u && p < v) && G++, (u < n || u === n && v < p) && A++); g[k * f + l] = A; g[l * f + k] = G}}Xo(a, b, d); return g}Z.prototype.countCrossings = function(){var a, b = 0, c, d; for (a = 0; a <= this.lb; a++){c = ap(this, a, 1); d = this.Md[a]; for (var f = 0; f < d; f++)for (var g = f; g < d; g++)b += c[f * d + g]}return b};
        function bp(a){for (var b = 0, c = 0; c <= a.lb; c++){for (var d = a, f = c, g = Wo(d, f), h = d.Md[f], k = 0, l = void 0, l = 0; l < h; l++){var m = g[l].Te, n, p, q; if ("undefined" !== typeof m)for (var r = 0; r < m.count; r++)n = m.n[r], n.valid && n.toVertex.layer !== f && (p = n.fromVertex.column + n.portFromColOffset, q = n.toVertex.column + n.portToColOffset, k += (Math.abs(p - q) + 1) * Yo(n))}Xo(d, f, g); b += k}return b}
Z.prototype.normalize = function(){var a = Infinity; this.Ib = - 1; for (var b = this.network.vertexes.k, c; b.next(); )c = b.value, a = Math.min(a, c.column - this.nodeMinColumnSpace(c, !0)), this.Ib = Math.max(this.Ib, c.column + this.nodeMinColumnSpace(c, !1)); for (b.reset(); b.next(); )b.value.column -= a; this.Ib -= a};
        function cp(a, b, c){e && (t.q(b, Z, "barycenters:unfixedLayer"), t.q(c, Z, "barycenters:direction")); var d = Wo(a, b), f = a.Md[b], g = [], h; for (h = 0; h < f; h++){var k = d[h], l = null; 0 >= c && (l = k.ef); var m = null; 0 <= c && (m = k.Te); var n = 0, p = 0, q = k.near; null !== q && q.layer === k.layer && (n += q.column - 1, p++); if (null !== l)for (q = 0; q < l.count; q++){var k = l.n[q], r = k.fromVertex; k.valid && !k.rev && r.layer !== b && (n += r.column + k.portFromColOffset, p++)}if (null !== m)for (l = 0; l < m.count; l++)k = m.n[l], q = k.toVertex, k.valid && !k.rev && q.layer !== b && (n += q.column + k.portToColOffset,
                p++); g[h] = 0 === p? - 1:n / p}Xo(a, b, d); return g}
function dp(a, b, c){e && (t.q(b, Z, "medians:unfixedLayer"), t.q(c, Z, "medians:direction")); for (var d = Wo(a, b), f = a.Md[b], g = [], h = 0; h < f; h++){var k = d[h], l = null; 0 >= c && (l = k.ef); var m = null; 0 <= c && (m = k.Te); var n = 0, p = [], q = k.near; null !== q && q.layer === k.layer && (p[n] = q.column - 1, n++); if (null !== l)for (q = 0; q < l.count; q++){var k = l.n[q], r = k.fromVertex; k.valid && !k.rev && r.layer !== b && (p[n] = r.column + k.portFromColOffset, n++)}if (null !== m)for (l = 0; l < m.count; l++)k = m.n[l], q = k.toVertex, k.valid && !k.rev && q.layer !== b && (p[n] = q.column + k.portToColOffset,
        n++); 0 === n?g[h] = - 1:(p.sort(function(a, b){return a - b}), m = n >> 1, g[h] = n & 1?p[m]:p[m - 1] + p[m] >> 1)}Xo(a, b, d); return g}function ep(a, b, c, d, f, g){if (b.component === d){b.component = c; var h, k; if (f)for (var l = b.gc; l.next(); ){var m = l.value.toVertex; h = b.layer - m.layer; k = a.linkMinLength(l.value); h === k && ep(a, m, c, d, f, g)}if (g)for (l = b.sc; l.next(); )m = l.value.fromVertex, h = m.layer - b.layer, k = a.linkMinLength(l.value), h === k && ep(a, m, c, d, f, g)}}
function fp(a, b, c, d, f, g){if (b.component === d){b.component = c; if (f)for (var h = b.gc, k; h.next(); )k = h.value.toVertex, fp(a, k, c, d, f, g); if (g)for (b = b.sc; b.next(); )h = b.value.fromVertex, fp(a, h, c, d, f, g)}}function No(a){for (a = a.vertexes.k; a.next(); ){var b = a.value; if (b.valid)return b}return null}function Ro(a){for (a = a.vertexes.k; a.next(); ){var b = a.value; if (b.valid){for (var c = !0, d = b.gc; d.next(); )if (d.value.toVertex.valid){c = !1; break}if (c)return b}}return null}
function So(a){for (a = a.vertexes.k; a.next(); ){var b = a.value; if (b.valid){for (var c = !0, d = b.sc; d.next(); )if (d.value.fromVertex.valid){c = !1; break}if (c)return b}}return null}function To(a, b){b.Zo = a.Er; a.Er++; for (var c = b.gc; c.next(); ){var d = c.value, f = d.toVertex; - 1 === f.Zo && (d.forest = !0, To(a, f))}b.finish = a.Er; a.Er++}
Z.prototype.assignLayers = function(){switch (this.no){case gp:hp(this); break; case ip:for (var a, b = this.network.vertexes.k; b.next(); )a = jp(this, b.value), this.lb = Math.max(a, this.lb); for (b.reset(); b.next(); )a = b.value, a.layer = this.lb - a.layer; break; default:case zo:hp(this); for (b = this.network.vertexes.k; b.next(); )b.value.valid = !1; for (b.reset(); b.next(); )0 === b.value.sc.count && kp(this, b.value); a = Infinity; for (b.reset(); b.next(); )a = Math.min(a, b.value.layer); this.lb = - 1; for (b.reset(); b.next(); )b.value.layer -= a, this.lb =
        Math.max(this.lb, b.value.layer)}}; function hp(a){for (var b = a.network.vertexes.k; b.next(); ){var c = lp(a, b.value); a.lb = Math.max(c, a.lb)}}function lp(a, b){var c = 0; if ( - 1 === b.layer){for (var d = b.gc; d.next(); )var f = d.value, g = a.linkMinLength(f), c = Math.max(c, lp(a, f.toVertex) + g); b.layer = c} else c = b.layer; return c}function jp(a, b){var c = 0; if ( - 1 === b.layer){for (var d, f, g = b.sc; g.next(); )f = g.value, d = a.linkMinLength(f), c = Math.max(c, jp(a, f.fromVertex) + d); b.layer = c} else c = b.layer; return c}
function kp(a, b){if (!b.valid){b.valid = !0; for (var c = b.gc; c.next(); )kp(a, c.value.toVertex); for (c = a.network.vertexes.k; c.next(); )c.value.component = - 1; for (var d = b.ef.n, f = d.length, g = 0; g < f; g++){var h = d[g], k = a.linkMinLength(h); h.fromVertex.layer - h.toVertex.layer > k && ep(a, h.fromVertex, 0, - 1, !0, !1)}for (ep(a, b, 1, - 1, !0, !0); 0 !== b.component; ){for (var k = 0, d = Infinity, l = 0, m = null, n = a.network.vertexes.k; n.next(); ){var p = n.value; if (1 === p.component){for (var q = 0, r = !1, s = p.ef.n, f = s.length, g = 0; g < f; g++){var h = s[g], u = h.fromVertex,
        q = q + 1; 1 !== u.component && (k += 1, u = u.layer - p.layer, h = a.linkMinLength(h), d = Math.min(d, u - h))}h = p.Te.n; f = h.length; for (g = 0; g < f; g++)s = h[g].toVertex, q -= 1, 1 !== s.component?k -= 1:r = !0; (null === m || q < l) && !r && (m = p, l = q)}}if (0 < k){for (c.reset(); c.next(); )f = c.value, 1 === f.component && (f.layer += d); b.component = 0} else m.component = 0}for (c = a.network.vertexes.k; c.next(); )c.value.component = - 1; for (ep(a, b, 1, - 1, !0, !1); 0 !== b.component; ){g = 0; f = Infinity; d = 0; k = null; for (l = a.network.vertexes.k; l.next(); )if (m = l.value, 1 === m.component){n =
        0; p = !1; h = m.ef.n; q = h.length; for (r = 0; r < q; r++)s = h[r].fromVertex, n += 1, 1 !== s.component?g += 1:p = !0; h = m.Te.n; q = h.length; for (r = 0; r < q; r++)s = h[r], u = s.toVertex, n -= 1, 1 !== u.component && (g -= 1, u = m.layer - u.layer, s = a.linkMinLength(s), f = Math.min(f, u - s)); (null === k || n > d) && !p && (k = m, d = n)}if (0 > g){for (c.reset(); c.next(); )g = c.value, 1 === g.component && (g.layer -= f); b.component = 0} else k.component = 0}}}
function Vo(a, b, c){return 90 === a.sa?c && !b.rev || !c && b.rev?270:90:180 === a.sa?c && !b.rev || !c && b.rev?0:180:270 === a.sa?c && !b.rev || !c && b.rev?90:270:c && !b.rev || !c && b.rev?180:0}
Z.prototype.initializeIndices = function(){switch (this.Zn){default:case mp:for (var a, b = this.network.vertexes.k; b.next(); ){var c = b.value; a = c.layer; c.index = this.Md[a]; this.Md[a]++}break; case Ao:b = this.network.vertexes.k; for (a = this.lb; 0 <= a; a--){for (; b.next(); )b.value.layer === a && - 1 === b.value.index && np(this, b.value); b.reset()}break; case op:for (b = this.network.vertexes.k, a = 0; a <= this.lb; a++){for (; b.next(); )b.value.layer === a && - 1 === b.value.index && pp(this, b.value); b.reset()}}};
        function np(a, b){var c = b.layer; b.index = a.Md[c]; a.Md[c]++; for (var c = b.Te.Ie(), d = !0, f; d; )for (d = !1, f = 0; f < c.length - 1; f++){var g = c[f], h = c[f + 1]; g.portFromColOffset > h.portFromColOffset && (d = !0, c[f] = h, c[f + 1] = g)}for (f = 0; f < c.length; f++)d = c[f], d.valid && (d = d.toVertex, - 1 === d.index && np(a, d))}
function pp(a, b){var c = b.layer; b.index = a.Md[c]; a.Md[c]++; for (var c = b.ef.Ie(), d = !0, f; d; )for (d = !1, f = 0; f < c.length - 1; f++){var g = c[f], h = c[f + 1]; g.portToColOffset > h.portToColOffset && (d = !0, c[f] = h, c[f + 1] = g)}for (f = 0; f < c.length; f++)d = c[f], d.valid && (d = d.fromVertex, - 1 === d.index && pp(a, d))}
Z.prototype.reduceCrossings = function(){var a = this.countCrossings(), b = Zo(this), c, d, f; for (c = 0; c < this.Yl; c++){for (d = 0; d <= this.lb; d++)qp(this, d, 1), rp(this, d, 1); f = this.countCrossings(); f < a && (a = f, b = Zo(this)); for (d = this.lb; 0 <= d; d--)qp(this, d, - 1), rp(this, d, - 1); f = this.countCrossings(); f < a && (a = f, b = Zo(this))}$o(this, b); for (c = 0; c < this.Yl; c++){for (d = 0; d <= this.lb; d++)qp(this, d, 0), rp(this, d, 0); f = this.countCrossings(); f < a && (a = f, b = Zo(this)); for (d = this.lb; 0 <= d; d--)qp(this, d, 0), rp(this, d, 0); f = this.countCrossings();
        f < a && (a = f, b = Zo(this))}$o(this, b); var g, h, k; switch (this.vn){case sp:break; case tp:for (k = a + 1; (d = this.countCrossings()) < k; )for (k = d, c = this.lb; 0 <= c; c--)for (h = 0; h <= c; h++){for (g = !0; g; )for (g = !1, d = c; d >= h; d--)g = rp(this, d, - 1) || g; f = this.countCrossings(); f >= a?$o(this, b):(a = f, b = Zo(this)); for (g = !0; g; )for (g = !1, d = c; d >= h; d--)g = rp(this, d, 1) || g; f = this.countCrossings(); f >= a?$o(this, b):(a = f, b = Zo(this)); for (g = !0; g; )for (g = !1, d = h; d <= c; d++)g = rp(this, d, 1) || g; f >= a?$o(this, b):(a = f, b = Zo(this)); for (g = !0; g; )for (g = !1, d = h; d <= c; d++)g =
        rp(this, d, - 1) || g; f >= a?$o(this, b):(a = f, b = Zo(this)); for (g = !0; g; )for (g = !1, d = c; d >= h; d--)g = rp(this, d, 0) || g; f >= a?$o(this, b):(a = f, b = Zo(this)); for (g = !0; g; )for (g = !1, d = h; d <= c; d++)g = rp(this, d, 0) || g; f >= a?$o(this, b):(a = f, b = Zo(this))}break; default:case Bo:for (c = this.lb, h = 0, k = a + 1; (d = this.countCrossings()) < k; ){k = d; for (g = !0; g; )for (g = !1, d = c; d >= h; d--)g = rp(this, d, - 1) || g; f = this.countCrossings(); f >= a?$o(this, b):(a = f, b = Zo(this)); for (g = !0; g; )for (g = !1, d = c; d >= h; d--)g = rp(this, d, 1) || g; f = this.countCrossings(); f >= a?$o(this, b):
        (a = f, b = Zo(this)); for (g = !0; g; )for (g = !1, d = h; d <= c; d++)g = rp(this, d, 1) || g; f >= a?$o(this, b):(a = f, b = Zo(this)); for (g = !0; g; )for (g = !1, d = h; d <= c; d++)g = rp(this, d, - 1) || g; f >= a?$o(this, b):(a = f, b = Zo(this)); for (g = !0; g; )for (g = !1, d = c; d >= h; d--)g = rp(this, d, 0) || g; f >= a?$o(this, b):(a = f, b = Zo(this)); for (g = !0; g; )for (g = !1, d = h; d <= c; d++)g = rp(this, d, 0) || g; f >= a?$o(this, b):(a = f, b = Zo(this))}}$o(this, b)};
        function qp(a, b, c){e && (t.q(b, Z, "medianBarycenterCrossingReduction:unfixedLayer"), t.q(c, Z, "medianBarycenterCrossingReduction:direction")); var d = Wo(a, b), f = a.Md[b], g = dp(a, b, c), h = cp(a, b, c); for (c = 0; c < f; c++) - 1 === h[c] && (h[c] = d[c].column), - 1 === g[c] && (g[c] = d[c].column); for (var k = !0, l; k; )for (k = !1, c = 0; c < f - 1; c++)if (g[c + 1] < g[c] || g[c + 1] === g[c] && h[c + 1] < h[c])k = !0, l = g[c], g[c] = g[c + 1], g[c + 1] = l, l = h[c], h[c] = h[c + 1], h[c + 1] = l, l = d[c], d[c] = d[c + 1], d[c + 1] = l; for (c = g = 0; c < f; c++)l = d[c], l.index = c, g += a.nodeMinColumnSpace(l, !0), l.column =
                g, g += 1, g += a.nodeMinColumnSpace(l, !1); Xo(a, b, d)}
function rp(a, b, c){var d = Wo(a, b), f = a.Md[b]; c = ap(a, b, c); var g, h; h = []; for (g = 0; g < f; g++)h[g] = - 1; var k; k = []; for (g = 0; g < f; g++)k[g] = - 1; for (var l = !1, m = !0; m; )for (m = !1, g = 0; g < f - 1; g++){var n = c[d[g].index * f + d[g + 1].index], p = c[d[g + 1].index * f + d[g].index], q = 0, r = 0, s = d[g].column, u = d[g + 1].column, v = a.nodeMinColumnSpace(d[g], !0), D = a.nodeMinColumnSpace(d[g], !1), A = a.nodeMinColumnSpace(d[g + 1], !0), G = a.nodeMinColumnSpace(d[g + 1], !1), v = s - v + A, D = u - D + G, L = d[g].sc.k; for (L.reset(); L.next(); )if (G = L.value, G.valid && G.fromVertex.layer ===
        b){G = G.fromVertex; for (A = 0; d[A] !== G; )A++; A < g && (q += 2 * (g - A), r += 2 * (g + 1 - A)); A === g + 1 && (q += 1); A > g + 1 && (q += 4 * (A - g), r += 4 * (A - (g + 1)))}L = d[g].gc.k; for (L.reset(); L.next(); )if (G = L.value, G.valid && G.toVertex.layer === b){G = G.toVertex; for (A = 0; d[A] !== G; )A++; A === g + 1 && (r += 1)}L = d[g + 1].sc.k; for (L.reset(); L.next(); )if (G = L.value, G.valid && G.fromVertex.layer === b){G = G.fromVertex; for (A = 0; d[A] !== G; )A++; A < g && (q += 2 * (g + 1 - A), r += 2 * (g - A)); A === g && (r += 1); A > g + 1 && (q += 4 * (A - (g + 1)), r += 4 * (A - g))}L = d[g + 1].gc.k; for (L.reset(); L.next(); )if (G = L.value,
        G.valid && G.toVertex.layer === b){G = G.toVertex; for (A = 0; d[A] !== G; )A++; A === g && (q += 1)}var A = G = 0, L = h[d[g].index], N = k[d[g].index], O = h[d[g + 1].index], U = k[d[g + 1].index]; - 1 !== L && (G += Math.abs(L - s), A += Math.abs(L - D)); - 1 !== N && (G += Math.abs(N - s), A += Math.abs(N - D)); - 1 !== O && (G += Math.abs(O - u), A += Math.abs(O - v)); - 1 !== U && (G += Math.abs(U - u), A += Math.abs(U - v)); if (r < q - 0.5 || r === q && p < n - 0.5 || r === q && p === n && A < G - 0.5)m = l = !0, d[g].column = D, d[g + 1].column = v, n = d[g], d[g] = d[g + 1], d[g + 1] = n}for (g = 0; g < f; g++)d[g].index = g; Xo(a, b, d); return l}
Z.prototype.straightenAndPack = function(){var a, b, c = 0 !== (this.Gi & up); a = this.Gi === Co; 1E3 < this.network.edges.count && !a && (c = !1); if (c){b = []; for (a = 0; a <= this.lb; a++)b[a] = 0; for (var d = this.network.vertexes.k, f, g; d.next(); )f = d.value, a = f.layer, g = f.column, f = this.nodeMinColumnSpace(f, !1), b[a] = Math.max(b[a], g + f); for (d.reset(); d.next(); )f = d.value, a = f.layer, g = f.column, f.column = (8 * (this.Ib - b[a]) >> 1) + 8 * g; this.Ib *= 8}if (0 !== (this.Gi & vp))for (b = !0; b; ){b = !1; for (a = this.Hf + 1; a <= this.lb; a++)b = wp(this, a, 1) || b; for (a = this.Hf -
        1; 0 <= a; a--)b = wp(this, a, - 1) || b; b = wp(this, this.Hf, 0) || b}if (0 !== (this.Gi & xp)){for (a = this.Hf + 1; a <= this.lb; a++)yp(this, a, 1); for (a = this.Hf - 1; 0 <= a; a--)yp(this, a, - 1); yp(this, this.Hf, 0)}c && (zp(this, - 1), zp(this, 1)); if (0 !== (this.Gi & vp))for (b = !0; b; ){b = !1; b = wp(this, this.Hf, 0) || b; for (a = this.Hf + 1; a <= this.lb; a++)b = wp(this, a, 0) || b; for (a = this.Hf - 1; 0 <= a; a--)b = wp(this, a, 0) || b}}; function wp(a, b, c){e && (t.q(b, Z, "bendStraighten:unfixedLayer"), t.q(c, Z, "bendStraighten:direction")); for (var d = !1; Ap(a, b, c); )d = !0; return d}
function Ap(a, b, c){e && (t.q(b, Z, "shiftbendStraighten:unfixedLayer"), t.q(c, Z, "shiftbendStraighten:direction")); var d, f = Wo(a, b), g = a.Md[b], h = cp(a, b, - 1); if (0 < c)for (d = 0; d < g; d++)h[d] = - 1; var k = cp(a, b, 1); if (0 > c)for (d = 0; d < g; d++)k[d] = - 1; for (var l = !1, m = !0; m; )for (m = !1, d = 0; d < g; d++){var n = f[d].column, p = a.nodeMinColumnSpace(f[d], !0), q = a.nodeMinColumnSpace(f[d], !1), p = 0 > d - 1 || n - f[d - 1].column - 1 > p + a.nodeMinColumnSpace(f[d - 1], !1)?n - 1:n, q = d + 1 >= g || f[d + 1].column - n - 1 > q + a.nodeMinColumnSpace(f[d + 1], !0)?n + 1:n, r = 0, s = 0, u = 0, v, D,
        A, G; if (0 >= c)for (var L = f[d].sc.k; L.next(); )v = L.value, v.valid && v.fromVertex.layer !== b && (D = Yo(v), A = v.portFromColOffset, G = v.portToColOffset, v = v.fromVertex.column, r += (Math.abs(n + G - (v + A)) + 1) * D, s += (Math.abs(p + G - (v + A)) + 1) * D, u += (Math.abs(q + G - (v + A)) + 1) * D); if (0 <= c)for (L = f[d].gc.k; L.next(); )v = L.value, v.valid && v.toVertex.layer !== b && (D = Yo(v), A = v.portFromColOffset, G = v.portToColOffset, v = v.toVertex.column, r += (Math.abs(n + A - (v + G)) + 1) * D, s += (Math.abs(p + A - (v + G)) + 1) * D, u += (Math.abs(q + A - (v + G)) + 1) * D); G = A = D = 0; v = h[f[d].index];
        L = k[f[d].index]; - 1 !== v && (D += Math.abs(v - n), A += Math.abs(v - p), G += Math.abs(v - q)); - 1 !== L && (D += Math.abs(L - n), A += Math.abs(L - p), G += Math.abs(L - q)); if (s < r || s === r && A < D)m = l = !0, f[d].column = p; if (u < r || u === r && G < D)m = l = !0, f[d].column = q}Xo(a, b, f); a.normalize(); return l}
function yp(a, b, c){e && (t.q(b, Z, "medianStraighten:unfixedLayer"), t.q(c, Z, "medianStraighten:direction")); var d = Wo(a, b), f = a.Md[b], g = dp(a, b, c), h = []; for (c = 0; c < f; c++)h[c] = g[c]; for (g = !0; g; )for (g = !1, c = 0; c < f; c++){var k = d[c].column, l = a.nodeMinColumnSpace(d[c], !0), m = a.nodeMinColumnSpace(d[c], !1), n = 0, p; - 1 === h[c]?0 === c && c === f - 1?n = k:0 === c?(p = d[c + 1].column, n = p - k === m + a.nodeMinColumnSpace(d[c + 1], !0)?k - 1:k):c === f - 1?(p = d[c - 1].column, n = k - p === l + a.nodeMinColumnSpace(d[c - 1], !1)?k + 1:k):(p = d[c - 1].column, l = p + a.nodeMinColumnSpace(d[c -
1], !1) + l + 1, p = d[c + 1].column, m = p - a.nodeMinColumnSpace(d[c + 1], !0) - m - 1, n = (l + m) / 2 | 0):0 === c && c === f - 1?n = h[c]:0 === c?(p = d[c + 1].column, m = p - a.nodeMinColumnSpace(d[c + 1], !0) - m - 1, n = Math.min(h[c], m)):c === f - 1?(p = d[c - 1].column, l = p + a.nodeMinColumnSpace(d[c - 1], !1) + l + 1, n = Math.max(h[c], l)):(p = d[c - 1].column, l = p + a.nodeMinColumnSpace(d[c - 1], !1) + l + 1, p = d[c + 1].column, m = p - a.nodeMinColumnSpace(d[c + 1], !0) - m - 1, l < h[c] && h[c] < m?n = h[c]:l >= h[c]?n = l:m <= h[c] && (n = m)); n !== k && (g = !0, d[c].column = n)}Xo(a, b, d); a.normalize()}
function Bp(a, b){e && (t.q(b, Z, "packAux:column"), t.q(1, Z, "packAux:direction")); for (var c = !0, d = a.network.vertexes.k, f; d.next(); ){f = d.value; var g = a.nodeMinColumnSpace(f, !0), h = a.nodeMinColumnSpace(f, !1); if (f.column - g <= b && f.column + h >= b){c = !1; break}}g = !1; if (c)for (d.reset(); d.next(); )f = d.value, f.column > b && (f.column -= 1, g = !0); return g}
function Cp(a, b){e && (t.q(b, Z, "tightPackAux:column"), t.q(1, Z, "tightPackAux:direction")); var c = b, c = b + 1, d, f = [], g = []; for (d = 0; d <= a.lb; d++)f[d] = !1, g[d] = !1; for (var h = a.network.vertexes.k; h.next(); ){d = h.value; var k = d.column - a.nodeMinColumnSpace(d, !0), l = d.column + a.nodeMinColumnSpace(d, !1); k <= b && l >= b && (f[d.layer] = !0); k <= c && l >= c && (g[d.layer] = !0)}k = !0; c = !1; for (d = 0; d <= a.lb; d++)k = k && !(f[d] && g[d]); if (k)for (h.reset(); h.next(); )d = h.value, d.column > b && (d.column -= 1, c = !0); return c}
function zp(a, b){e && t.q(b, Z, "componentPack:direction"); for (var c = 0; c <= a.Ib; c++)for (; Bp(a, c); ); a.normalize(); for (c = 0; c < a.Ib; c++)for (; Cp(a, c); ); a.normalize(); var d, f, g, h; if (0 < b)for (c = 0; c <= a.Ib; c++)for (d = Zo(a), f = bp(a), g = f + 1; f < g; )g = f, Dp(a, c, 1), h = bp(a), h > f?$o(a, d):h < f && (f = h, d = Zo(a)); if (0 > b)for (c = a.Ib; 0 <= c; c--)for (d = Zo(a), f = bp(a), g = f + 1; f < g; )g = f, Dp(a, c, - 1), h = bp(a), h > f?$o(a, d):h < f && (f = h, d = Zo(a)); a.normalize()}
function Dp(a, b, c){a.ig = 0; for (var d = a.network.vertexes.k, f; d.next(); )d.value.component = - 1; if (0 < c)for (d.reset(); d.next(); )f = d.value, f.column - a.nodeMinColumnSpace(f, !0) <= b && (f.component = a.ig); if (0 > c)for (d.reset(); d.next(); )f = d.value, f.column + a.nodeMinColumnSpace(f, !1) >= b && (f.component = a.ig); a.ig++; for (d.reset(); d.next(); )f = d.value, - 1 === f.component && (fp(a, f, a.ig, - 1, !0, !0), a.ig++); b = []; for (f = 0; f < a.ig * a.ig; f++)b[f] = !1; var g = []; for (f = 0; f < (a.lb + 1) * (a.Ib + 1); f++)g[f] = - 1; for (d.reset(); d.next(); ){f = d.value;
        for (var h = f.layer, k = Math.max(0, f.column - a.nodeMinColumnSpace(f, !0)), l = Math.min(a.Ib, f.column + a.nodeMinColumnSpace(f, !1)); k <= l; k++)g[h * (a.Ib + 1) + k] = f.component}for (f = 0; f <= a.lb; f++){if (0 < c)for (k = 0; k < a.Ib; k++) - 1 !== g[f * (a.Ib + 1) + k] && - 1 !== g[f * (a.Ib + 1) + k + 1] && g[f * (a.Ib + 1) + k] !== g[f * (a.Ib + 1) + k + 1] && (b[g[f * (a.Ib + 1) + k] * a.ig + g[f * (a.Ib + 1) + k + 1]] = !0); if (0 > c)for (k = a.Ib; 0 < k; k--) - 1 !== g[f * (a.Ib + 1) + k] && - 1 !== g[f * (a.Ib + 1) + k - 1] && g[f * (a.Ib + 1) + k] !== g[f * (a.Ib + 1) + k - 1] && (b[g[f * (a.Ib + 1) + k] * a.ig + g[f * (a.Ib + 1) + k - 1]] = !0)}g = []; for (f =
        0; f < a.ig; f++)g[f] = !0; h = new B("number"); for (h.add(0); 0 !== h.count; )if (l = h.n[h.count - 1], h.qd(h.count - 1), g[l])for (g[l] = !1, f = 0; f < a.ig; f++)b[l * a.ig + f] && h.Gd(0, f); if (0 < c)for (d.reset(); d.next(); )f = d.value, g[f.component] && (f.column -= 1); if (0 > c)for (d.reset(); d.next(); )f = d.value, g[f.component] && (f.column += 1)}Z.prototype.commitLayout = function(){if (this.xl)for (var a = Uo(this, !0), b = Uo(this, !1), c = this.network.edges.k, d; c.next(); )d = c.value.link, null !== d && (d.pb = a, d.tb = b); this.commitNodes(); this.Uz(); this.qt && this.commitLinks()};
        function Uo(a, b){return 270 === a.sa?b?Tb:Wb:90 === a.sa?b?Wb:Tb:180 === a.sa?b?Ub:Vb:b?Vb:Ub}
Z.prototype.commitNodes = function(){this.Ug = []; this.fg = []; this.Gf = []; this.Nb = []; for (var a = 0; a <= this.lb; a++)this.Ug[a] = 0, this.fg[a] = 0, this.Gf[a] = 0, this.Nb[a] = 0; for (var a = this.network.vertexes.k, b, c; a.next(); )b = a.value, c = b.layer, this.Ug[c] = Math.max(this.Ug[c], this.nodeMinLayerSpace(b, !0)), this.fg[c] = Math.max(this.fg[c], this.nodeMinLayerSpace(b, !1)); var d = 0, f = this.am; for (b = 0; b <= this.lb; b++)c = f, 0 >= this.Ug[b] + this.fg[b] && (c = 0), 0 < b && (d += c / 2), 90 === this.sa || 0 === this.sa?(d += this.fg[b], this.Gf[b] = d, d += this.Ug[b]):
        (d += this.Ug[b], this.Gf[b] = d, d += this.fg[b]), b < this.lb && (d += c / 2), this.Nb[b] = d; f = d; d = this.Dd; for (b = 0; b <= this.lb; b++)270 === this.sa?this.Gf[b] = d.y + this.Gf[b]:90 === this.sa?(this.Gf[b] = d.y + f - this.Gf[b], this.Nb[b] = f - this.Nb[b]):180 === this.sa?this.Gf[b] = d.x + this.Gf[b]:(this.Gf[b] = d.x + f - this.Gf[b], this.Nb[b] = f - this.Nb[b]); for (a.reset(); a.next(); ){b = a.value; c = b.layer; var g = b.column | 0; 270 === this.sa || 90 === this.sa?(f = d.x + this.xd * g, c = this.Gf[c]):(f = this.Gf[c], c = d.y + this.xd * g); b.Da = f; b.Pa = c; b.commit()}};
        Z.prototype.Uz = function(){for (var a = 0, b = this.am, c = 0; c <= this.lb; c++)a += this.Ug[c], a += this.fg[c]; for (var a = a + this.lb * b, b = [], c = this.xd * this.Ib, d = this.jJ; 0 <= d; d--)270 === this.sa?0 === d?b.push(new x(0, 0, c, Math.abs(this.Nb[0]))):b.push(new x(0, this.Nb[d - 1], c, Math.abs(this.Nb[d - 1] - this.Nb[d]))):90 === this.sa?0 === d?b.push(new x(0, this.Nb[0], c, Math.abs(this.Nb[0] - a))):b.push(new x(0, this.Nb[d], c, Math.abs(this.Nb[d - 1] - this.Nb[d]))):180 === this.sa?0 === d?b.push(new x(0, 0, Math.abs(this.Nb[0]), c)):b.push(new x(this.Nb[d -
        1], 0, Math.abs(this.Nb[d - 1] - this.Nb[d]), c)):0 === d?b.push(new x(this.Nb[0], 0, Math.abs(this.Nb[0] - a), c)):b.push(new x(this.Nb[d], 0, Math.abs(this.Nb[d - 1] - this.Nb[d]), c)); this.commitLayers(b, H.mj)}; Z.prototype.commitLayers = function(){};
        Z.prototype.commitLinks = function(){for (var a = this.network.edges.k, b, c; a.next(); )c = a.value.link, "undefined" !== typeof c && null !== c && (c.yl(), c.Uo(), c.Vi()); for (a.reset(); a.next(); )c = a.value.link, "undefined" !== typeof c && null !== c && c.updateRoute(); for (a.reset(); a.next(); )if (b = a.value, c = b.link){c.yl(); var d = c, f = d.aa, g = d.ca, h = d.ud, k = d.de; if (b.valid){if (c.De === Pg && 4 === c.oa){if (b.rev)var l = f, f = g, g = l, m = h, h = k, k = m; if (b.fromVertex.column === b.toVertex.column){var n = c.getLinkPoint(f, h, c.computeSpot(!0), !0, !1, g, k),
                p = c.getLinkPoint(g, k, c.computeSpot(!1), !1, !1, f, h); c.Uo(); c.Wk(n.x, n.y); c.Wk((2 * n.x + p.x) / 3, (2 * n.y + p.y) / 3); c.Wk((n.x + 2 * p.x) / 3, (n.y + 2 * p.y) / 3); c.Wk(p.x, p.y)} else{var q = !1, r = !1; null !== h && c.computeSpot(!0) === wb && (q = !0); null !== k && c.computeSpot(!1) === wb && (r = !0); if (q || r){var s = c.o(0).x, u = c.o(0).y, v = c.o(1).x, D = c.o(1).y, A = c.o(2).x, G = c.o(2).y, L = c.o(3).x, N = c.o(3).y; if (q){90 === this.sa || 270 === this.sa?(v = s, D = (u + N) / 2):(v = (s + L) / 2, D = u); c.Y(1, v, D); var O = c.getLinkPoint(f, h, c.computeSpot(!0), !0, !1, g, k); c.Y(0, O.x, O.y)}r &&
                (90 === this.sa || 270 === this.sa?(A = L, G = (u + N) / 2):(A = (s + L) / 2, G = N), c.Y(2, A, G), O = c.getLinkPoint(g, k, c.computeSpot(!1), !1, !1, f, h), c.Y(3, O.x, O.y))}}}c.Vi()} else if (b.fromVertex.layer === b.toVertex.layer)c.Vi(); else{var U = !1, Y = !1, ba, R = c.ft + 1; if (c.ic)Y = !0, ba = c.oa, 4 < ba && c.points.removeRange(2, ba - 3); else if (c.De === Pg)U = !0, ba = c.oa, 4 < ba && c.points.removeRange(2, ba - 3), R = 2; else{ba = c.oa; var xa = c.computeSpot(!0) === wb, Ya = c.computeSpot(!1) === wb; 2 < ba && xa && Ya?c.points.removeRange(1, ba - 2):3 < ba && xa && !Ya?c.points.removeRange(1,
                ba - 3):3 < ba && !xa && Ya?c.points.removeRange(2, ba - 2):4 < ba && !xa && !Ya && c.points.removeRange(2, ba - 3)}var za = b.fromVertex, Na = b.toVertex, va, Pa; if (b.rev){for (var Ga; null !== Na && za !== Na; ){Pa = va = null; for (var Jf = Na.sc.k; Jf.next() && (ic = Jf.value, ic.link !== b.link || (va = ic.fromVertex, Pa = ic.toVertex, null !== va.rd)); ); va !== za && (kb = c.o(R - 1).x, fb = c.o(R - 1).y, Ia = va.Da, Ja = va.Pa, Y?180 === this.sa || 0 === this.sa?2 === R?(c.C(R++, kb, fb), c.C(R++, kb, Ja)):(md = null !== Pa?Pa.Pa:fb, md !== Ja && (Xa = this.Nb[va.layer - 1], c.C(R++, Xa, fb), c.C(R++, Xa,
                Ja))):2 === R?(c.C(R++, kb, fb), c.C(R++, Ia, fb)):(mf = null !== Pa?Pa.Da:kb, mf !== Ia && (Xa = this.Nb[va.layer - 1], c.C(R++, kb, Xa), c.C(R++, Ia, Xa))):2 === R?U?(db = Math.max(10, this.Ug[Na.layer]), Ab = Math.max(10, this.fg[Na.layer]), 180 === this.sa?(Ga = Na.T.x, c.C(R++, Ga - db, Ja), c.C(R++, Ga, Ja), c.C(R++, Ga + Ab, Ja)):90 === this.sa?(Ga = Na.T.y + Na.T.height, c.C(R++, Ia, Ga + Ab), c.C(R++, Ia, Ga), c.C(R++, Ia, Ga - db)):270 === this.sa?(Ga = Na.T.y, c.C(R++, Ia, Ga - db), c.C(R++, Ia, Ga), c.C(R++, Ia, Ga + Ab)):(Ga = Na.T.x + Na.T.width, c.C(R++, Ga + Ab, Ja), c.C(R++, Ga,
                Ja), c.C(R++, Ga - db, Ja))):(c.C(R++, kb, fb), 180 === this.sa || 0 === this.sa?c.C(R++, kb, Ja):c.C(R++, Ia, fb), c.C(R++, Ia, Ja)):(db = Math.max(10, this.Ug[va.layer]), Ab = Math.max(10, this.fg[va.layer]), 180 === this.sa?(U && c.C(R++, Ia - db, Ja), c.C(R++, Ia, Ja), U && c.C(R++, Ia + Ab, Ja)):90 === this.sa?(U && c.C(R++, Ia, Ja + Ab), c.C(R++, Ia, Ja), U && c.C(R++, Ia, Ja - db)):270 === this.sa?(U && c.C(R++, Ia, Ja - db), c.C(R++, Ia, Ja), U && c.C(R++, Ia, Ja + Ab)):(U && c.C(R++, Ia + Ab, Ja), c.C(R++, Ia, Ja), U && c.C(R++, Ia - db, Ja)))); Na = va}if (null === k || c.computeSpot(!1) !== wb)if (kb =
                c.o(R - 1).x, fb = c.o(R - 1).y, Ia = c.o(R).x, Ja = c.o(R).y, Y){var lf = this.fg[za.layer], Zb; 180 === this.sa || 0 === this.sa?(Zb = fb, Zb >= za.T.y && Zb <= za.T.bottom && (Ga = za.Da + lf, Zb = Zb < za.T.y + za.T.height / 2?za.T.y - this.xd / 2:za.T.bottom + this.xd / 2, c.C(R++, Ga, fb), c.C(R++, Ga, Zb)), c.C(R++, Ia, Zb)):(Zb = kb, Zb >= za.T.x && Zb <= za.T.right && (Ga = za.Pa + lf, Zb = Zb < za.T.x + za.T.width / 2?za.T.x - this.xd / 2:za.T.right + this.xd / 2, c.C(R++, kb, Ga), c.C(R++, Zb, Ga)), c.C(R++, Zb, Ja)); c.C(R++, Ia, Ja)} else U?(db = Math.max(10, this.Ug[za.layer]), Ab = Math.max(10, this.fg[za.layer]),
                180 === this.sa?(Ga = za.T.x + za.T.width, c.Y(R - 2, Ga, fb), c.Y(R - 1, Ga + Ab, fb)):90 === this.sa?(Ga = za.T.y, c.Y(R - 2, kb, Ga), c.Y(R - 1, kb, Ga - db)):270 === this.sa?(Ga = za.T.y + za.T.height, c.Y(R - 2, kb, Ga), c.Y(R - 1, kb, Ga + Ab)):(Ga = za.T.x, c.Y(R - 2, Ga, fb), c.Y(R - 1, Ga - db, fb))):(180 === this.sa || 0 === this.sa?c.C(R++, Ia, fb):c.C(R++, kb, Ja), c.C(R++, Ia, Ja))} else{for (; null !== za && za !== Na; ){Pa = va = null; for (var fg = za.gc.k, ic; fg.next() && (ic = fg.value, ic.link !== b.link || (va = ic.toVertex, Pa = ic.fromVertex, null !== Pa.rd && (Pa = null), null !== va.rd)); ); var kb,
                fb, Ia, Ja, Xa, db, Ab; if (va !== Na)if (kb = c.o(R - 1).x, fb = c.o(R - 1).y, Ia = va.Da, Ja = va.Pa, Y)if (180 === this.sa || 0 === this.sa){var md = null !== Pa?Pa.Pa:fb; md !== Ja && (Xa = this.Nb[va.layer], 2 === R && (Xa = 0 === this.sa?Math.max(Xa, kb):Math.min(Xa, kb)), c.C(R++, Xa, fb), c.C(R++, Xa, Ja))} else{var mf = null !== Pa?Pa.Da:kb; mf !== Ia && (Xa = this.Nb[va.layer], 2 === R && (Xa = 90 === this.sa?Math.max(Xa, fb):Math.min(Xa, fb)), c.C(R++, kb, Xa), c.C(R++, Ia, Xa))} else db = Math.max(10, this.Ug[va.layer]), Ab = Math.max(10, this.fg[va.layer]), 180 === this.sa?(c.C(R++,
                Ia + Ab, Ja), U && c.C(R++, Ia, Ja), c.C(R++, Ia - db, Ja)):90 === this.sa?(c.C(R++, Ia, Ja - db), U && c.C(R++, Ia, Ja), c.C(R++, Ia, Ja + Ab)):270 === this.sa?(c.C(R++, Ia, Ja + Ab), U && c.C(R++, Ia, Ja), c.C(R++, Ia, Ja - db)):(c.C(R++, Ia - db, Ja), U && c.C(R++, Ia, Ja), c.C(R++, Ia + Ab, Ja)); za = va}Y && (kb = c.o(R - 1).x, fb = c.o(R - 1).y, Ia = c.o(R).x, Ja = c.o(R).y, 180 === this.sa || 0 === this.sa?fb !== Ja && (Xa = 0 === this.sa?Math.min(Math.max((Ia + kb) / 2, this.Nb[Na.layer]), Ia):Math.max(Math.min((Ia + kb) / 2, this.Nb[Na.layer]), Ia), c.C(R++, Xa, fb), c.C(R++, Xa, Ja)):kb !== Ia && (Xa =
                90 === this.sa?Math.min(Math.max((Ja + fb) / 2, this.Nb[Na.layer]), Ja):Math.max(Math.min((Ja + fb) / 2, this.Nb[Na.layer]), Ja), c.C(R++, kb, Xa), c.C(R++, Ia, Xa)))}if (null !== d && U){if (null !== h){if (c.computeSpot(!0) === wb){var Dd = c.o(0), nd = c.o(2); Dd.M(nd) || c.Y(1, (Dd.x + nd.x) / 2, (Dd.y + nd.y) / 2)}O = c.getLinkPoint(f, h, wb, !0, !1, g, k); c.Y(0, O.x, O.y)}null !== k && (c.computeSpot(!1) === wb && (Dd = c.o(c.oa - 1), nd = c.o(c.oa - 3), Dd.M(nd) || c.Y(c.oa - 2, (Dd.x + nd.x) / 2, (Dd.y + nd.y) / 2)), O = c.getLinkPoint(g, k, wb, !1, !1, f, h), c.Y(c.oa - 1, O.x, O.y))}c.Vi();
                b.commit()}}for (var Ne = new B(V), Ed = this.network.edges.k, te; Ed.next(); )te = Ed.value.link, null !== te && te.ic && !Ne.contains(te) && Ne.add(te); if (0 < Ne.count)if (90 === this.sa || 270 === this.sa){for (var Kf = 0, Bb = new B(Ep), Bg = Ne.k, Hb, qb, Za; Bg.next(); )if (Hb = Bg.value, null !== Hb && Hb.ic)for (var yb = 2; yb < Hb.oa - 3; yb++)if (qb = Hb.o(yb), Za = Hb.o(yb + 1), this.I(qb.y, Za.y) && !this.I(qb.x, Za.x)){var jc = new Ep; jc.layer = Math.floor(qb.y / 2); var Lf = Hb.o(0), Mf = Hb.o(Hb.oa - 1); jc.$a = Lf.x * Lf.x + Lf.y; jc.Yd = Mf.x * Mf.x + Mf.y; jc.Be = Math.min(qb.x, Za.x);
                jc.Sd = Math.max(qb.x, Za.x); jc.index = yb; jc.link = Hb; if (yb + 2 < Hb.oa){var kc = Hb.o(yb - 1), Uc = Hb.o(yb + 2), od = 0; kc.y < qb.y?od = Uc.y < qb.y?3:qb.x < Za.x?2:1:kc.y > qb.y && (od = Uc.y > qb.y?0:Za.x < qb.x?2:1); jc.ii = od}Bb.add(jc)}if (1 < Bb.count){Bb.sort(this.cG); for (var dc = 0; dc < Bb.count; ){for (var pd = Bb.n[dc].layer, $a = dc + 1; $a < Bb.count && Bb.n[$a].layer === pd; )$a++; if (1 < $a - dc)for (var Ta = dc; Ta < $a; ){for (var Qb = Bb.n[Ta].Sd, Ib = dc + 1; Ib < $a && Bb.n[Ib].Be < Qb; )Qb = Math.max(Qb, Bb.n[Ib].Sd), Ib++; var Oe = Ib - Ta; if (1 < Oe){Bb.Tp(this.mx, Ta, Ta + Oe); for (var Pd =
                1, oc = Bb.n[Ta].Yd, Jb, yb = Ta; yb < Ib; yb++)Jb = Bb.n[yb], Jb.Yd !== oc && (Pd++, oc = Jb.Yd); Bb.Tp(this.bG, Ta, Ta + Oe); for (var ee = 1, oc = Bb.n[Ta].$a, yb = Ta; yb < Ib; yb++)Jb = Bb.n[yb], Jb.$a !== oc && (ee++, oc = Jb.$a); var rb, Fd; Pd < ee?(rb = !1, Fd = Pd, oc = Bb.n[Ta].Yd, Bb.Tp(this.mx, Ta, Ta + Oe)):(rb = !0, Fd = ee, oc = Bb.n[Ta].$a); for (var Cg = 0, yb = Ta; yb < Ib; yb++){Jb = Bb.n[yb]; (rb?Jb.$a:Jb.Yd) !== oc && (Cg++, oc = rb?Jb.$a:Jb.Yd); Hb = Jb.link; qb = Hb.o(Jb.index); Za = Hb.o(Jb.index + 1); var Pe = this.xp * (Cg - (Fd - 1) / 2); if (!Hb.cj || Fp(qb.x, qb.y + Pe, Za.x, Za.y + Pe))Kf++, Hb.yl(),
                Hb.Y(Jb.index, qb.x, qb.y + Pe), Hb.Y(Jb.index + 1, Za.x, Za.y + Pe), Hb.Vi()}}Ta = Ib}dc = $a}}} else{for (var Gd = 0, gb = new B(Ep), nf = Ne.k, ib, sb, Vc; nf.next(); )if (ib = nf.value, null !== ib && ib.ic)for (var Mb = 2; Mb < ib.oa - 3; Mb++)if (sb = ib.o(Mb), Vc = ib.o(Mb + 1), this.I(sb.x, Vc.x) && !this.I(sb.y, Vc.y)){var Qd = new Ep; Qd.layer = Math.floor(sb.x / 2); var Rd = ib.o(0), fe = ib.o(ib.oa - 1); Qd.$a = Rd.x + Rd.y * Rd.y; Qd.Yd = fe.x + fe.y * fe.y; Qd.Be = Math.min(sb.y, Vc.y); Qd.Sd = Math.max(sb.y, Vc.y); Qd.index = Mb; Qd.link = ib; if (Mb + 2 < ib.oa){var Fc = ib.o(Mb - 1), ue = ib.o(Mb +
                2), Gc = 0; Fc.x < sb.x?Gc = ue.x < sb.x?3:sb.y < Vc.y?2:1:Fc.x > sb.x && (Gc = ue.x > sb.x?0:Vc.y < sb.y?2:1); Qd.ii = Gc}gb.add(Qd)}if (1 < gb.count){gb.sort(this.cG); for (var Cb = 0; Cb < gb.count; ){for (var Qe = gb.n[Cb].layer, qd = Cb + 1; qd < gb.count && gb.n[qd].layer === Qe; )qd++; if (1 < qd - Cb)for (var lb = Cb; lb < qd; ){for (var Hd = gb.n[lb].Sd, Db = Cb + 1; Db < qd && gb.n[Db].Be < Hd; )Hd = Math.max(Hd, gb.n[Db].Sd), Db++; var Sd = Db - lb; if (1 < Sd){gb.Tp(this.mx, lb, lb + Sd); for (var Id = 1, lc = gb.n[lb].Yd, Nb, Mb = lb; Mb < Db; Mb++)Nb = gb.n[Mb], Nb.Yd !== lc && (Id++, lc = Nb.Yd); gb.Tp(this.bG,
                lb, lb + Sd); for (var tb = 1, lc = gb.n[lb].$a, Mb = lb; Mb < Db; Mb++)Nb = gb.n[Mb], Nb.$a !== lc && (tb++, lc = Nb.$a); var of, bb; Id < tb?(of = !1, bb = Id, lc = gb.n[lb].Yd, gb.Tp(this.mx, lb, lb + Sd)):(of = !0, bb = tb, lc = gb.n[lb].$a); for (var Jd = 0, Mb = lb; Mb < Db; Mb++){Nb = gb.n[Mb]; (of?Nb.$a:Nb.Yd) !== lc && (Jd++, lc = of?Nb.$a:Nb.Yd); ib = Nb.link; sb = ib.o(Nb.index); Vc = ib.o(Nb.index + 1); var Wc = this.xp * (Jd - (bb - 1) / 2); if (!ib.cj || Fp(sb.x + Wc, sb.y, Vc.x + Wc, Vc.y))Gd++, ib.yl(), ib.Y(Nb.index, sb.x + Wc, sb.y), ib.Y(Nb.index + 1, Vc.x + Wc, Vc.y), ib.Vi()}}lb = Db}Cb = qd}}}};
        function Ep(){this.index = this.Sd = this.Be = this.Yd = this.$a = this.layer = 0; this.link = null; this.ii = 0}t.Td(Ep, {layer:!0, $a:!0, Yd:!0, Be:!0, Sd:!0, index:!0, link:!0, ii:!0}); Z.prototype.cG = function(a, b){return a instanceof Ep && b instanceof Ep && a !== b?a.layer < b.layer? - 1:a.layer > b.layer?1:a.Be < b.Be? - 1:a.Be > b.Be?1:a.Sd < b.Sd? - 1:a.Sd > b.Sd?1:0:0};
        Z.prototype.bG = function(a, b){return a instanceof Ep && b instanceof Ep && a !== b?a.$a < b.$a? - 1:a.$a > b.$a || a.ii < b.ii?1:a.ii > b.ii || a.Be < b.Be? - 1:a.Be > b.Be?1:a.Sd < b.Sd? - 1:a.Sd > b.Sd?1:0:0}; Z.prototype.mx = function(a, b){return a instanceof Ep && b instanceof Ep && a !== b?a.Yd < b.Yd? - 1:a.Yd > b.Yd || a.ii < b.ii?1:a.ii > b.ii || a.Be < b.Be? - 1:a.Be > b.Be?1:a.Sd < b.Sd? - 1:a.Sd > b.Sd?1:0:0}; Z.prototype.I = function(a, b){e && (t.q(a, Z, "isApprox:a"), t.q(b, Z, "isApprox:b")); var c = a - b; return - 1 < c && 1 > c};
        function Fp(a, b, c, d){e && (t.q(a, Z, "isUnoccupied2:px"), t.q(b, Z, "isUnoccupied2:py"), t.q(c, Z, "isUnoccupied2:qx"), t.q(d, Z, "isUnoccupied2:qy")); return!0}function Wo(a, b){var c, d = a.Md[b]; if (d >= a.Xg.length){c = []; var f; for (f = 0; f < a.Xg.length; f++)c[f] = a.Xg[f]; a.Xg = c}"undefined" === typeof a.Xg[d] || null === a.Xg[d]?c = []:(c = a.Xg[d], a.Xg[d] = null); var d = a.Fr[b], g; for (f = 0; f < d.length; f++)g = d[f], g instanceof Gp && (c[g.index] = g); return c}function Xo(a, b, c){a.Xg[a.Md[b]] = c}t.g(Z, "layerSpacing", Z.prototype.layerSpacing);
        t.defineProperty(Z, {layerSpacing:"layerSpacing"}, function(){return this.am}, function(a){this.am !== a && (t.i(a, "number", Z, "layerSpacing"), 0 <= a && (this.am = a, this.J()))}); t.g(Z, "columnSpacing", Z.prototype.cI); t.defineProperty(Z, {cI:"columnSpacing"}, function(){return this.xd}, function(a){this.xd !== a && (t.i(a, "number", Z, "columnSpacing"), 0 <= a && (this.xd = a, this.J()))}); t.g(Z, "direction", Z.prototype.direction);
        t.defineProperty(Z, {direction:"direction"}, function(){return this.sa}, function(a){this.sa !== a && (t.i(a, "number", Z, "direction"), this.sa = a, this.J())}); t.g(Z, "cycleRemoveOption", Z.prototype.hE); t.defineProperty(Z, {hE:"cycleRemoveOption"}, function(){return this.Dn}, function(a){this.Dn !== a && (t.Aa(a, Z, Z, "cycleRemoveOption"), a === Eo || a === yo) && (this.Dn = a, this.J())}); t.g(Z, "layeringOption", Z.prototype.kF);
        t.defineProperty(Z, {kF:"layeringOption"}, function(){return this.no}, function(a){this.no !== a && (t.Aa(a, Z, Z, "layeringOption"), a === zo || a === gp || a === ip) && (this.no = a, this.J())}); t.g(Z, "initializeOption", Z.prototype.YE); t.defineProperty(Z, {YE:"initializeOption"}, function(){return this.Zn}, function(a){this.Zn !== a && (t.Aa(a, Z, Z, "initializeOption"), a === Ao || a === op || a === mp) && (this.Zn = a, this.J())}); t.g(Z, "iterations", Z.prototype.bJ);
        t.defineProperty(Z, {bJ:"iterations"}, function(){return this.Yl}, function(a){this.Yl !== a && (t.q(a, Do, "iterations"), 0 <= a && (this.Yl = a, this.J()))}); t.g(Z, "aggressiveOption", Z.prototype.JD); t.defineProperty(Z, {JD:"aggressiveOption"}, function(){return this.vn}, function(a){this.vn !== a && (t.Aa(a, Z, Z, "aggressiveOption"), a === sp || a === Bo || a === tp) && (this.vn = a, this.J())}); t.g(Z, "packOption", Z.prototype.yJ);
        t.defineProperty(Z, {yJ:"packOption"}, function(){return this.Gi}, function(a){this.Gi !== a && (t.i(a, "number", Z, "packOption"), 0 <= a && 8 > a && (this.Gi = a, this.J()))}); t.g(Z, "setsPortSpots", Z.prototype.xl); t.defineProperty(Z, {xl:"setsPortSpots"}, function(){return this.Lh}, function(a){this.Lh !== a && (t.i(a, "boolean", Z, "setsPortSpots"), this.Lh = a, this.J())}); t.g(Z, "linkSpacing", Z.prototype.xp);
        t.defineProperty(Z, {xp:"linkSpacing"}, function(){return this.yj}, function(a){this.yj !== a && (t.i(a, "number", Z, "linkSpacing"), 0 <= a && (this.yj = a, this.J()))}); t.A(Z, {jJ:"maxLayer"}, function(){return this.lb}); t.A(Z, {CK:"maxIndex"}, function(){return this.$u}); t.A(Z, {BK:"maxColumn"}, function(){return this.Ib}); t.A(Z, {EK:"minIndexLayer"}, function(){return this.yr}); t.A(Z, {DK:"maxIndexLayer"}, function(){return this.Hf}); var yo; Z.CycleDepthFirst = yo = t.w(Z, "CycleDepthFirst", 0); var Eo;
        Z.CycleGreedy = Eo = t.w(Z, "CycleGreedy", 1); var zo; Z.LayerOptimalLinkLength = zo = t.w(Z, "LayerOptimalLinkLength", 0); var gp; Z.LayerLongestPathSink = gp = t.w(Z, "LayerLongestPathSink", 1); var ip; Z.LayerLongestPathSource = ip = t.w(Z, "LayerLongestPathSource", 2); var Ao; Z.InitDepthFirstOut = Ao = t.w(Z, "InitDepthFirstOut", 0); var op; Z.InitDepthFirstIn = op = t.w(Z, "InitDepthFirstIn", 1); var mp; Z.InitNaive = mp = t.w(Z, "InitNaive", 2); var sp; Z.AggressiveNone = sp = t.w(Z, "AggressiveNone", 0); var Bo;
        Z.AggressiveLess = Bo = t.w(Z, "AggressiveLess", 1); var tp; Z.AggressiveMore = tp = t.w(Z, "AggressiveMore", 2); Z.PackNone = 0; var up; Z.PackExpand = up = 1; var vp; Z.PackStraighten = vp = 2; var xp; Z.PackMedian = xp = 4; var Co; Z.PackAll = Co = 7; function Do(){ra.call(this)}t.ga("LayeredDigraphNetwork", Do); t.Ka(Do, ra); Do.prototype.createVertex = function(){return new Gp}; Do.prototype.createEdge = function(){return new Hp};
        function Gp(){ta.call(this); this.index = this.column = this.layer = - 1; this.component = NaN; this.near = null; this.valid = !1; this.finish = this.Zo = NaN; this.Bm = 0; this.HA = this.IA = void 0}t.ga("LayeredDigraphVertex", Gp); t.Ka(Gp, ta); function Hp(){ua.call(this); this.forest = this.rev = this.valid = !1; this.portToPos = this.portFromPos = NaN; this.portToColOffset = this.portFromColOffset = 0}t.ga("LayeredDigraphEdge", Hp); t.Ka(Hp, ua);
        function X(){0 < arguments.length && t.$c(X); ce.call(this); this.Vc = new C(Object); this.Ii = Ip; this.Ff = Jp; this.Cs = Kp; this.Wu = Lp; this.FB = null; this.sh = !0; this.bd = Mp; this.Zf = (new ga(10, 10)).freeze(); this.ua = new Np; this.ta = new Np}t.ga("TreeLayout", X); t.Ka(X, ce); X.prototype.cloneProtected = function(a){ce.prototype.cloneProtected.call(this, a); a.Ii = this.Ii; a.Cs = this.Cs; a.Wu = this.Wu; a.sh = this.sh; a.bd = this.bd; a.Zf.assign(this.Zf); a.ua.copyInheritedPropertiesFrom(this.ua); a.ta.copyInheritedPropertiesFrom(this.ta)};
        X.prototype.createNetwork = function(){var a = new Op; Kn(a, this); return a}; X.prototype.makeNetwork = function(a){var b = this.createNetwork(); a instanceof z?(Pp(this, b, a.jh, !0), Pp(this, b, a.links, !0)):a instanceof T?Pp(this, b, a.Xc, !1):Pp(this, b, a.k, !1); return b};
        function Pp(a, b, c, d){for (c = c.k; c.next(); ){var f = c.value; f instanceof S && f.canLayout() && "Comment" !== f.Wc && (!d || f.rp) && (f.bi || (f instanceof T && null === f.jc?Pp(a, b, f.Xc, !1):b.Ko(f)))}for (c.reset(); c.next(); )if (f = c.value, f instanceof V && f.canLayout() && "Comment" !== f.Wc && (!d || f.rp)){var g = f.aa; a = f.ca; null !== g && null !== a && g !== a && "Comment" !== g.Wc && "Comment" !== a.Wc && (g = b.findGroupVertex(g), a = b.findGroupVertex(a), null !== g && null !== a && b.$m(g, a, f))}}
X.prototype.doLayout = function(a){a || t.m("Layout.doLayout(collection) argument must not be null but a Diagram, a Group, or an Iterable of Parts"); null === this.network && (this.network = this.makeNetwork(a)); this.Qe !== Qp && (this.Dd = this.initialOrigin(this.Dd)); var b = this.h; null === b && a instanceof z && (b = a); this.Ff = this.path === Ip && null !== b?b.pd?Jp:Rp:this.path === Ip?Jp:this.path; if (0 < this.network.vertexes.count){this.network.tw(); for (b = this.network.vertexes.k; b.next(); )a = b.value, a.initialized = !1, a.level = 0, a.parent =
        null, a.children = []; if (0 < this.Vc.count)for (b = this.Vc.k, this.Vc = new C(Np); b.next(); )a = b.value, a instanceof S?(a = this.network.Qm(a), null !== a && this.Vc.add(a)):a instanceof Np && this.Vc.add(a); 0 === this.Vc.count && this.findRoots(); for (b = this.Vc.copy().k; b.next(); )a = b.value, a.initialized || (a.initialized = !0, Sp(this, a)); for (a = this.Vc.k; a.next(); )Tp(this, a.value); for (a = this.Vc.k; a.next(); )Up(this, a.value); for (a = this.Vc.k; a.next(); )Vp(this, a.value); this.Mz(); if (this.Tw === Wp){var c = []; for (a = this.network.vertexes.k; a.next(); ){var b =
        a.value, d = b.parent; d || (d = b); var d = 0 === d.angle || 180 === d.angle, f = c[b.level]; void 0 === f && (f = 0); c[b.level] = Math.max(f, d?b.width:b.height)}for (f = 0; f < c.length; f++)void 0 === c[f] && (c[f] = 0); this.FB = c; for (a = this.network.vertexes.k; a.next(); )b = a.value, (d = b.parent) || (d = b), 0 === d.angle || 180 === d.angle?(180 === d.angle && (b.ep += c[b.level] - b.width), b.width = c[b.level]):(270 === d.angle && (b.fp += c[b.level] - b.height), b.height = c[b.level])} else if (this.Tw === Xp)for (a = this.network.vertexes.k; a.next(); ){b = a.value; d = 0 === b.angle ||
        180 === b.angle; c = - 1; for (f = 0; f < b.children.length; f++)var g = b.children[f], c = Math.max(c, d?g.width:g.height); if (0 <= c)for (f = 0; f < b.children.length; f++)g = b.children[f], d?(180 === b.angle && (g.ep += c - g.width), g.width = c):(270 === b.angle && (g.fp += c - g.height), g.height = c)}for (a = this.Vc.k; a.next(); )this.layoutTree(a.value); this.arrangeTrees(); this.updateParts()}this.network = null; this.Vc = new C(Object); this.$e = !0};
        X.prototype.findRoots = function(){for (var a = this.network.vertexes.k; a.next(); ){var b = a.value; switch (this.Ff){case Jp:0 === b.sc.count && this.Vc.add(b); break; case Rp:0 === b.gc.count && this.Vc.add(b); break; default:t.m("Unhandled path value " + this.Ff.toString())}}if (0 === this.Vc.count){for (var a = 999999, b = null, c = this.network.vertexes.k; c.next(); ){var d = c.value; switch (this.Ff){case Jp:d.sc.count < a && (a = d.sc.count, b = d); break; case Rp:d.gc.count < a && (a = d.gc.count, b = d); break; default:t.m("Unhandled path value " + this.Ff.toString())}}null !==
                b && this.Vc.add(b)}};
        function Sp(a, b){if (null !== b){e && t.l(b, Np, X, "walkTree:v"); switch (a.Ff){case Jp:if (0 < b.gc.count){for (var c = new B(Np), d = b.vI; d.next(); ){var f = d.value; Yp(a, b, f) && c.add(f)}0 < c.count && (b.children = c.Ie())}break; case Rp:if (0 < b.sc.count){c = new B(Np); for (d = b.PJ; d.next(); )f = d.value, Yp(a, b, f) && c.add(f); 0 < c.count && (b.children = c.Ie())}break; default:t.m("Unhandled path value" + a.Ff.toString())}for (var c = b.children, d = c.length, g = 0; g < d; g++)f = c[g], f.initialized = !0, f.level = b.level + 1, f.parent = b, a.Vc.remove(f); for (g = 0; g <
                d; g++)f = c[g], Sp(a, f)}}function Yp(a, b, c){e && t.l(b, Np, X, "walkOK:v"); e && t.l(c, Np, X, "walkOK:c"); if (c.initialized){var d; if (null === b)d = !1; else{e && t.l(c, Np, X, "isAncestor:a"); e && t.l(b, Np, X, "isAncestor:b"); for (d = b.parent; null !== d && d !== c; )d = d.parent; d = d === c}if (d || c.level > b.level)return!1; a.removeChild(c.parent, c)}return!0}
X.prototype.removeChild = function(a, b){if (null !== a && null !== b){e && t.l(a, Np, X, "removeChild:p"); e && t.l(b, Np, X, "removeChild:c"); for (var c = a.children, d = 0, f = 0; f < c.length; f++)c[f] === b && d++; if (0 < d){for (var d = Array(c.length - d), g = 0, f = 0; f < c.length; f++)c[f] !== b && (d[g++] = c[f]); a.children = d}}};
        function Tp(a, b){if (null !== b){e && t.l(b, Np, X, "initializeTree:v"); a.initializeTreeVertexValues(b); b.alignment === Zp && a.sortTreeVertexChildren(b); for (var c = 0, d = b.Fm, f = 0, g = b.children, h = g.length, k = 0; k < h; k++){var l = g[k]; Tp(a, l); c += l.descendantCount + 1; d = Math.max(d, l.maxChildrenCount); f = Math.max(f, l.maxGenerationCount)}b.descendantCount = c; b.maxChildrenCount = d; b.maxGenerationCount = 0 < d?f + 1:0}}
function $p(a, b){e && t.l(b, Np, X, "mom:v"); switch (a.Cs){default:case Kp:return null !== b.parent?b.parent:a.ua; case aq:return null === b.parent?a.ua:null === b.parent.parent?a.ta:b.parent; case bq:if (null !== b.parent)return null !== b.parent.parent?b.parent.parent:a.ta; case cq:var c = !0; if (0 === b.Fm)c = !1; else for (var d = b.children, f = d.length, g = 0; g < f; g++)if (0 < d[g].Fm){c = !1; break}return c && null !== b.parent?a.ta:null !== b.parent?b.parent:a.ua}}
X.prototype.initializeTreeVertexValues = function(a){e && t.l(a, Np, X, "initializeTreeVertexValues:v"); var b = $p(this, a); a.copyInheritedPropertiesFrom(b); if (null !== a.parent && a.parent.alignment === Zp){for (var b = a.angle, c = a.parent.children, d = 0; d < c.length && a !== c[d]; )d++; 0 === d % 2?d !== c.length - 1 && (b = 90 === b?180:180 === b?270:270 === b?180:270):b = 90 === b?0:180 === b?90:270 === b?0:90; a.angle = b}a.initialized = !0};
        function Up(a, b){if (null !== b){e && t.l(b, Np, X, "assignTree:v"); a.assignTreeVertexValues(b); for (var c = b.children, d = c.length, f = 0; f < d; f++)Up(a, c[f])}}X.prototype.assignTreeVertexValues = function(){}; function Vp(a, b){if (null !== b){e && t.l(b, Np, X, "sortTree:v"); b.alignment !== Zp && a.sortTreeVertexChildren(b); for (var c = b.children, d = c.length, f = 0; f < d; f++)Vp(a, c[f])}}
X.prototype.sortTreeVertexChildren = function(a){e && t.l(a, Np, X, "sortTreeVertexChildren:v"); switch (a.sorting){case dq:break; case eq:a.children.reverse(); break; case fq:a.children.sort(a.comparer); break; case gq:a.children.sort(a.comparer); a.children.reverse(); break; default:t.m("Unhandled sorting value " + a.sorting.toString())}}; X.prototype.Mz = function(){if (this.comments)for (var a = this.network.vertexes.k; a.next(); )this.addComments(a.value)};
        X.prototype.addComments = function(a){e && t.l(a, Np, X, "addComments:v"); var b = a.angle, c = a.parent, d = 0, f = hq, f = !1; null !== c && (d = c.angle, f = c.alignment, f = iq(f)); var b = 90 === b || 270 === b, d = 90 === d || 270 === d, c = 0 === a.Fm, g = 0, h = 0, k = 0, l = a.commentSpacing; if (null !== a.Fc)for (var m = a.Fc.zE(); m.next(); ){var n = m.value; "Comment" === n.Wc && n.Sa() && (null === a.comments && (a.comments = []), a.comments.push(n), n.rf(), n = n.Ea, b && !c || !f && !d && c || f && d && c?(g = Math.max(g, n.width), h += n.height + Math.abs(k)):(g += n.width + Math.abs(k), h = Math.max(h, n.height)),
                k = l)}null !== a.comments && (b && !c || !f && !d && c || f && d && c?(g += Math.abs(a.commentMargin), h = Math.max(0, h - a.height)):(h += Math.abs(a.commentMargin), g = Math.max(0, g - a.width)), f = t.hk(0, 0, a.T.width + g, a.T.height + h), a.Ob = f, t.hc(f))}; function iq(a){return a === jq || a === Zp || a === kq || a === lq}function mq(a){return a === jq || a === Zp}
function nq(a){e && t.l(a, Np, X, "isLeftSideBus:v"); var b = a.parent; if (null !== b){var c = b.alignment; if (iq(c)){if (mq(c)){b = b.children; for (c = 0; c < b.length && a !== b[c]; )c++; return 0 === c % 2}if (c === kq)return!0}}return!1}
X.prototype.layoutComments = function(a){e && t.l(a, Np, X, "layoutComments:v"); if (null !== a.comments){var b = a.Fc.Ea, c = a.parent, d = a.angle, f = 0, g = hq, g = !1; null !== c && (f = c.angle, g = c.alignment, g = iq(g)); for (var d = 90 === d || 270 === d, h = 90 === f || 270 === f, k = 0 === a.Fm, l = nq(a), m = 0, n = a.comments, p = n.length, q = t.K(), r = 0; r < p; r++){var c = n[r], s = c.Ea; if (d && !k || !g && !h && k || g && h && k){if (135 < f && !g || h && l)if (0 <= a.commentMargin){q.p(a.T.x - a.commentMargin - s.width, a.T.y + m); c.move(q); for (var u = c.tg(); u.next(); )c = u.value, c.pb = Ub, c.tb = Vb} else for (q.p(a.T.x +
        2 * a.O.x - a.commentMargin, a.T.y + m), c.move(q), u = c.tg(); u.next(); )c = u.value, c.pb = Vb, c.tb = Ub; else if (0 <= a.commentMargin)for (q.p(a.T.x + 2 * a.O.x + a.commentMargin, a.T.y + m), c.move(q), u = c.tg(); u.next(); )c = u.value, c.pb = Vb, c.tb = Ub; else for (q.p(a.T.x + a.commentMargin - s.width, a.T.y + m), c.move(q), u = c.tg(); u.next(); )c = u.value, c.pb = Ub, c.tb = Vb; m = 0 <= a.commentSpacing?m + (s.height + a.commentSpacing):m + (a.commentSpacing - s.height)} else{if (135 < f && !g || !h && l)if (0 <= a.commentMargin)for (q.p(a.T.x + m, a.T.y - a.commentMargin - s.height),
        c.move(q), u = c.tg(); u.next(); )c = u.value, c.pb = Tb, c.tb = Wb; else for (q.p(a.T.x + m, a.T.y + 2 * a.O.y - a.commentMargin), c.move(q), u = c.tg(); u.next(); )c = u.value, c.pb = Wb, c.tb = Tb; else if (0 <= a.commentMargin)for (q.p(a.T.x + m, a.T.y + 2 * a.O.y + a.commentMargin), c.move(q), u = c.tg(); u.next(); )c = u.value, c.pb = Wb, c.tb = Tb; else for (q.p(a.T.x + m, a.T.y + a.commentMargin - s.height), c.move(q), u = c.tg(); u.next(); )c = u.value, c.pb = Tb, c.tb = Wb; m = 0 <= a.commentSpacing?m + (s.width + a.commentSpacing):m + (a.commentSpacing - s.width)}}t.B(q); b = m - a.commentSpacing -
        (d?b.height:b.width); if (this.Ff === Jp)for (a = a.gc; a.next(); )f = a.value, (c = f.link) && !c.cj && (c.ck = 0 < b?b:NaN); else for (a = a.sc; a.next(); )f = a.value, (c = f.link) && !c.cj && (c.ik = 0 < b?b:NaN)}};
        X.prototype.layoutTree = function(a){if (null !== a){e && t.l(a, Np, X, "layoutTree:v"); for (var b = a.children, c = b.length, d = 0; d < c; d++)this.layoutTree(b[d]); switch (a.compaction){case oq:pq(this, a); break; case qq:if (a.alignment === Zp)pq(this, a); else if (e && t.l(a, Np, X, "layoutTreeBlock:v"), 0 === a.Fm){var d = a.parent, b = !1, c = 0, f = hq; null !== d && (c = d.angle, f = d.alignment, b = iq(f)); d = nq(a); a.na.p(0, 0); a.Za.p(a.width, a.height); null === a.parent || null === a.comments || (180 !== c && 270 !== c || b) && !d?a.Ia.p(0, 0):180 === c && !b || (90 === c || 270 ===
                c) && d?a.Ia.p(a.width - 2 * a.O.x, 0):a.Ia.p(0, a.height - 2 * a.O.y); a.st = null; a.It = null} else{for (var g = rq(a), b = 90 === g || 270 === g, h = 0, k = a.children, l = k.length, m = 0; m < l; m++)var n = k[m], h = Math.max(h, b?n.Za.width:n.Za.height); var p = a.alignment, d = p === sq, q = p === tq, r = iq(p), s = Math.max(0, a.breadthLimit), c = uq(a), u = a.nodeSpacing, v = vq(a), D = a.rowSpacing, A = 0; if (d || q || a.Np || a.Op && 1 === a.maxGenerationCount)A = Math.max(0, a.rowIndent); var d = a.width, f = a.height, G = 0, L = 0, N = 0, O = null, U = null, Y = 0, ba = 0, R = 0, xa = 0, Ya = 0, za = 0, Na = 0, va = 0, n = 0; r && !mq(p) &&
                135 < g && k.reverse(); if (mq(p))if (1 < l)for (m = 0; m < l; m++)0 === m % 2 && m !== l - 1?va = Math.max(va, b?k[m].Za.width:k[m].Za.height):0 !== m % 2 && (n = Math.max(n, b?k[m].Za.width:k[m].Za.height)); else 1 === l && (va = b?k[0].Za.width:k[0].Za.height); if (r){switch (p){case jq:ba = 135 > g?wq(a, k, va, G, L):xq(a, k, va, G, L); va = ba[0]; G = ba[1]; L = ba[2]; break; case kq:for (m = 0; m < l; m++){var n = k[m], Pa = n.Za, O = 0 === za?0:D; b?(n.na.p(h - Pa.width, xa + O), G = Math.max(G, Pa.width), L = Math.max(L, xa + O + Pa.height), xa += O + Pa.height):(n.na.p(R + O, h - Pa.height), G = Math.max(G,
                R + O + Pa.width), L = Math.max(L, Pa.height), R += O + Pa.width); za++}break; case lq:for (m = 0; m < l; m++)n = k[m], Pa = n.Za, O = 0 === za?0:D, b?(n.na.p(u / 2 + a.O.x, xa + O), G = Math.max(G, Pa.width), L = Math.max(L, xa + O + Pa.height), xa += O + Pa.height):(n.na.p(R + O, u / 2 + a.O.y), G = Math.max(G, R + O + Pa.width), L = Math.max(L, Pa.height), R += O + Pa.width), za++}O = yq(this, 2); U = yq(this, 2); b?(O[0].p(0, 0), O[1].p(0, L), U[0].p(G, 0)):(O[0].p(0, 0), O[1].p(G, 0), U[0].p(0, L)); U[1].p(G, L)} else for (m = 0; m < l; m++){n = k[m]; Pa = n.Za; if (b){0 < s && 0 < za && R + u + Pa.width > s && (R < h && zq(a,
                p, h - R, 0, Na, m - 1), Ya++, za = 0, Na = m, N = L, R = 0, xa = 135 < g? - L - D:L + D); Aq(this, n, 0, xa); var Ga = 0; if (0 === za){if (O = n.st, U = n.It, Y = Pa.width, ba = Pa.height, null === O || null === U || g !== rq(n))O = yq(this, 2), U = yq(this, 2), O[0].p(0, 0), O[1].p(0, ba), U[0].p(Y, 0), U[1].p(Y, ba)} else ba = Bq(this, a, n, O, U, Y, ba), Ga = ba[0], O = ba[1], U = ba[2], Y = ba[3], ba = ba[4], R < Pa.width && 0 > Ga && (Cq(a, - Ga, 0, Na, m - 1), Dq(O, - Ga, 0), Dq(U, - Ga, 0), Ga = 0); n.na.p(Ga, xa); G = Math.max(G, Y); L = Math.max(L, N + (0 === Ya?0:D) + Pa.height); R = Y} else{0 < s && 0 < za && xa + u + Pa.height > s && (xa < h && zq(a, p,
                0, h - xa, Na, m - 1), Ya++, za = 0, Na = m, N = G, xa = 0, R = 135 < g? - G - D:G + D); Aq(this, n, R, 0); Ga = 0; if (0 === za){if (O = n.st, U = n.It, Y = Pa.width, ba = Pa.height, null === O || null === U || g !== rq(n))O = yq(this, 2), U = yq(this, 2), O[0].p(0, 0), O[1].p(Y, 0), U[0].p(0, ba), U[1].p(Y, ba)} else ba = Bq(this, a, n, O, U, Y, ba), Ga = ba[0], O = ba[1], U = ba[2], Y = ba[3], ba = ba[4], xa < Pa.height && 0 > Ga && (Cq(a, 0, - Ga, Na, m - 1), Dq(O, 0, - Ga), Dq(U, 0, - Ga), Ga = 0); n.na.p(R, Ga); L = Math.max(L, ba); G = Math.max(G, N + (0 === Ya?0:D) + Pa.width); xa = ba}za++}0 < Ya && (b?(L += Math.max(0, c), R < G && zq(a, p, G - R, 0,
                Na, l - 1), 0 < A && (q || Cq(a, A, 0, 0, l - 1), G += A)):(G += Math.max(0, c), xa < L && zq(a, p, 0, L - xa, Na, l - 1), 0 < A && (q || Cq(a, 0, A, 0, l - 1), L += A))); q = h = 0; switch (p){case Eq:b?h += G / 2 - a.O.x - v / 2:q += L / 2 - a.O.y - v / 2; break; case hq:0 < Ya?b?h += G / 2 - a.O.x - v / 2:q += L / 2 - a.O.y - v / 2:b?(m = k[0].na.x + k[0].Ia.x, va = k[l - 1].na.x + k[l - 1].Ia.x + 2 * k[l - 1].O.x, h += m + (va - m) / 2 - a.O.x - v / 2):(m = k[0].na.y + k[0].Ia.y, va = k[l - 1].na.y + k[l - 1].Ia.y + 2 * k[l - 1].O.y, q += m + (va - m) / 2 - a.O.y - v / 2); break; case sq:b?(h -= v, G += v):(q -= v, L += v); break; case tq:b?(h += G - a.width + v, G += v):(q += L - a.height +
                v, L += v); break; case jq:b?h = 1 < l?h + (va + u / 2 - a.O.x):h + (k[0].O.x - a.O.x + k[0].Ia.x):q = 1 < l?q + (va + u / 2 - a.O.y):q + (k[0].O.y - a.O.y + k[0].Ia.y); break; case kq:b?h += G + u / 2 - a.O.x:q += L + u / 2 - a.O.y; break; case lq:break; default:t.m("Unhandled alignment value " + p.toString())}for (m = 0; m < l; m++)n = k[m], b?n.na.p(n.na.x + n.Ia.x - h, n.na.y + (135 < g?(r? - L: - n.Za.height) + n.Ia.y - c:f + c + n.Ia.y)):n.na.p(n.na.x + (135 < g?(r? - G: - n.Za.width) + n.Ia.x - c:d + c + n.Ia.x), n.na.y + n.Ia.y - q); l = k = 0; r?b?(G = Fq(a, G, h), 0 > h && (h = 0), 135 < g && (q += L + c), L += f + c, p === lq && (k += u /
                2 + a.O.x), l += f + c):(135 < g && (h += G + c), G += d + c, L = Gq(a, L, q), 0 > q && (q = 0), p === lq && (l += u / 2 + a.O.y), k += d + c):b?(null === a.comments?d > G && (p = Hq(p, d - G, 0), k = p[0], l = p[1], G = d, h = 0):G = Fq(a, G, h), 0 > h && (k -= h, h = 0), 135 < g && (q += L + c), L = Math.max(Math.max(L, f), L + f + c), l += f + c):(135 < g && (h += G + c), G = Math.max(Math.max(G, d), G + d + c), null === a.comments?f > L && (p = Hq(p, 0, f - L), k = p[0], l = p[1], L = f, q = 0):L = Gq(a, L, q), 0 > q && (l -= q, q = 0), k += d + c); if (0 < Ya)g = yq(this, 4), p = yq(this, 4), b?(g[2].p(0, f + c), g[3].p(g[2].x, L), p[2].p(G, g[2].y), p[3].p(p[2].x, g[3].y)):(g[2].p(d +
                c, 0), g[3].p(G, g[2].y), p[2].p(g[2].x, L), p[3].p(g[3].x, p[2].y)); else{g = yq(this, O.length + 2); p = yq(this, U.length + 2); for (m = 0; m < O.length; m++)r = O[m], g[m + 2].p(r.x + k, r.y + l); for (m = 0; m < U.length; m++)r = U[m], p[m + 2].p(r.x + k, r.y + l)}b?(g[0].p(h, 0), g[1].p(g[0].x, f), g[2].y < g[1].y && (g[2].x > g[0].x?g[2].assign(g[1]):g[1].assign(g[2])), g[3].y < g[2].y && (g[3].x > g[0].x?g[3].assign(g[2]):g[2].assign(g[3])), p[0].p(h + d, 0), p[1].p(p[0].x, f), p[2].y < p[1].y && (p[2].x < p[0].x?p[2].assign(p[1]):p[1].assign(p[2])), p[3].y < p[2].y && (p[3].x <
                p[0].x?p[3].assign(p[2]):p[2].assign(p[3])), g[2].y -= c / 2, p[2].y -= c / 2):(g[0].p(0, q), g[1].p(d, g[0].y), g[2].x < g[1].x && (g[2].y > g[0].y?g[2].assign(g[1]):g[1].assign(g[2])), g[3].x < g[2].x && (g[3].y > g[0].y?g[3].assign(g[2]):g[2].assign(g[3])), p[0].p(0, q + f), p[1].p(d, p[0].y), p[2].x < p[1].x && (p[2].y < p[0].y?p[2].assign(p[1]):p[1].assign(p[2])), p[3].x < p[2].x && (p[3].y < p[0].y?p[3].assign(p[2]):p[2].assign(p[3])), g[2].x -= c / 2, p[2].x -= c / 2); Iq(this, O); Iq(this, U); a.st = g; a.It = p; a.Ia.p(h, q); a.Za.p(G, L)}break; default:t.m("Unhandled compaction value " +
                a.compaction.toString())}}};
        function pq(a, b){e && t.l(b, Np, X, "layoutTreeNone:v"); if (0 === b.Fm){var c = !1, d = 0, f = hq; null !== b.parent && (d = b.parent.angle, f = b.parent.alignment, c = iq(f)); f = nq(b); b.na.p(0, 0); b.Za.p(b.width, b.height); null === b.parent || null === b.comments || (180 !== d && 270 !== d || c) && !f?b.Ia.p(0, 0):180 === d && !c || (90 === d || 270 === d) && f?b.Ia.p(b.width - 2 * b.O.x, 0):b.Ia.p(0, b.height - 2 * b.O.y)} else{for (var c = rq(b), d = 90 === c || 270 === c, g = 0, f = b.children, h = f.length, k = 0; k < h; k++)var l = f[k], g = Math.max(g, d?l.Za.width:l.Za.height); var m = b.alignment, n =
                m === sq, p = m === tq, q = iq(m), r = Math.max(0, b.breadthLimit), s = uq(b), u = b.nodeSpacing, v = vq(b), D = n || p?0:v / 2, A = b.rowSpacing, G = 0; if (n || p || b.Np || b.Op && 1 === b.maxGenerationCount)G = Math.max(0, b.rowIndent); var n = b.width, L = b.height, N = 0, O = 0, U = 0, Y = 0, ba = 0, R = 0, xa = 0, Ya = 0, za = 0, Na = 0; q && !mq(m) && 135 < c && f.reverse(); if (mq(m))if (1 < h)for (k = 0; k < h; k++){var l = f[k], va = l.Za; 0 === k % 2 && k !== h - 1?za = Math.max(za, (d?va.width:va.height) + Jq(l) - u):0 !== k % 2 && (Na = Math.max(Na, (d?va.width:va.height) + Jq(l) - u))} else 1 === h && (za = d?f[0].Za.width:f[0].Za.height);
                if (q)switch (m){case jq:case Zp:O = 135 > c?wq(b, f, za, N, O):xq(b, f, za, N, O); za = O[0]; N = O[1]; O = O[2]; break; case kq:for (k = 0; k < h; k++)l = f[k], va = l.Za, r = 0 === xa?0:A, d?(l.na.p(g - va.width, ba + r), N = Math.max(N, va.width), O = Math.max(O, ba + r + va.height), ba += r + va.height):(l.na.p(Y + r, g - va.height), N = Math.max(N, Y + r + va.width), O = Math.max(O, va.height), Y += r + va.width), xa++; break; case lq:for (g = 0; g < h; g++)l = f[g], va = l.Za, r = 0 === xa?0:A, d?(l.na.p(u / 2 + b.O.x, ba + r), N = Math.max(N, va.width), O = Math.max(O, ba + r + va.height), ba += r + va.height):(l.na.p(Y +
                r, u / 2 + b.O.y), N = Math.max(N, Y + r + va.width), O = Math.max(O, va.height), Y += r + va.width), xa++} else for (k = 0; k < h; k++)l = f[k], va = l.Za, d?(0 < r && 0 < xa && Y + u + va.width > r && (Y < g && zq(b, m, g - Y, 0, Ya, k - 1), R++, xa = 0, Ya = k, U = O, Y = 0, ba = 135 < c? - O - A:O + A), Na = 0 === xa?D:u, Aq(a, l, 0, ba), l.na.p(Y + Na, ba), N = Math.max(N, Y + Na + va.width), O = Math.max(O, U + (0 === R?0:A) + va.height), Y += Na + va.width):(0 < r && 0 < xa && ba + u + va.height > r && (ba < g && zq(b, m, 0, g - ba, Ya, k - 1), R++, xa = 0, Ya = k, U = N, ba = 0, Y = 135 < c? - N - A:N + A), Na = 0 === xa?D:u, Aq(a, l, Y, 0), l.na.p(Y, ba + Na), O = Math.max(O, ba +
                Na + va.height), N = Math.max(N, U + (0 === R?0:A) + va.width), ba += Na + va.height), xa++; 0 < R && (d?(O += Math.max(0, s), Y < N && zq(b, m, N - Y, 0, Ya, h - 1), 0 < G && (p || Cq(b, G, 0, 0, h - 1), N += G)):(N += Math.max(0, s), ba < O && zq(b, m, 0, O - ba, Ya, h - 1), 0 < G && (p || Cq(b, 0, G, 0, h - 1), O += G))); G = p = 0; switch (m){case Eq:d?p += N / 2 - b.O.x - v / 2:G += O / 2 - b.O.y - v / 2; break; case hq:0 < R?d?p += N / 2 - b.O.x - v / 2:G += O / 2 - b.O.y - v / 2:d?(m = f[0].na.x + f[0].Ia.x, u = f[h - 1].na.x + f[h - 1].Ia.x + 2 * f[h - 1].O.x, p += m + (u - m) / 2 - b.O.x - v / 2):(m = f[0].na.y + f[0].Ia.y, u = f[h - 1].na.y + f[h - 1].Ia.y + 2 * f[h - 1].O.y,
                G += m + (u - m) / 2 - b.O.y - v / 2); break; case sq:d?(p -= v, N += v):(G -= v, O += v); break; case tq:d?(p += N - b.width + v, N += v):(G += O - b.height + v, O += v); break; case jq:case Zp:d?p = 1 < h?p + (za + u / 2 - b.O.x):p + (f[0].O.x - b.O.x + f[0].Ia.x):G = 1 < h?G + (za + u / 2 - b.O.y):G + (f[0].O.y - b.O.y + f[0].Ia.y); break; case kq:d?p += N + u / 2 - b.O.x:G += O + u / 2 - b.O.y; break; case lq:break; default:t.m("Unhandled alignment value " + m.toString())}for (k = 0; k < h; k++)l = f[k], d?l.na.p(l.na.x + l.Ia.x - p, l.na.y + (135 < c?(q? - O: - l.Za.height) + l.Ia.y - s:L + s + l.Ia.y)):l.na.p(l.na.x + (135 < c?(q?
                - N: - l.Za.width) + l.Ia.x - s:n + s + l.Ia.x), l.na.y + l.Ia.y - G); d?(N = Fq(b, N, p), 0 > p && (p = 0), 135 < c && (G += O + s), O += L + s):(135 < c && (p += N + s), N += n + s, O = Gq(b, O, G), 0 > G && (G = 0)); b.Ia.p(p, G); b.Za.p(N, O)}}
function wq(a, b, c, d, f){e && t.l(a, Np, X, "layoutBusChildrenPosDir:v"); var g = b.length; if (0 === g)return a = [], a[0] = c, a[1] = d, a[2] = f, a; if (1 === g){var h = b[0]; d = h.Za.width; f = h.Za.height; a = []; a[0] = c; a[1] = d; a[2] = f; return a}for (var k = a.nodeSpacing, l = a.rowSpacing, m = 90 === rq(a), n = 0, p = 0, q = 0, r = 0; r < g; r++)if (!(0 !== r % 2 || 1 < g && r === g - 1)){var h = b[r], s = h.Za, u = 0 === n?0:l; if (m){var v = Jq(h) - k; h.na.p(c - (s.width + v), q + u); d = Math.max(d, s.width + v); f = Math.max(f, q + u + s.height); q += u + s.height} else v = Jq(h) - k, h.na.p(p + u, c - (s.height + v)), f = Math.max(f,
        s.height + v), d = Math.max(d, p + u + s.width), p += u + s.width; n++}var n = 0, D = p, A = q; m?(p = c + k, q = 0):(p = 0, q = c + k); for (r = 0; r < g; r++)0 !== r % 2 && (h = b[r], s = h.Za, u = 0 === n?0:l, m?(v = Jq(h) - k, h.na.p(p + v, q + u), d = Math.max(d, p + s.width + v), f = Math.max(f, q + u + s.height), q += u + s.height):(v = Jq(h) - k, h.na.p(p + u, q + v), d = Math.max(d, p + u + s.width), f = Math.max(f, q + s.height + v), p += u + s.width), n++); 1 < g && 1 === g % 2 && (h = b[g - 1], s = h.Za, b = Kq(h, m?Math.max(Math.abs(A), Math.abs(q)):Math.max(Math.abs(D), Math.abs(p))), m?(h.na.p(c + k / 2 - h.O.x - h.Ia.x, f + b), m = c + k / 2 - h.O.x -
        h.Ia.x, d = Math.max(d, m + s.width), 0 > m && (d -= m), f = Math.max(f, Math.max(A, q) + b + s.height), 0 > h.na.x && (c = Qq(a, h.na.x, !1, c, k))):(h.na.p(d + b, c + k / 2 - h.O.y - h.Ia.y), d = Math.max(d, Math.max(D, p) + b + s.width), m = c + k / 2 - h.O.y - h.Ia.y, f = Math.max(f, m + s.height), 0 > m && (f -= m), 0 > h.na.y && (c = Qq(a, h.na.y, !0, c, k)))); a = []; a[0] = c; a[1] = d; a[2] = f; return a}
function xq(a, b, c, d, f){e && t.l(a, Np, X, "layoutBusChildrenNegDir:v"); var g = b.length; if (0 === g)return a = [], a[0] = c, a[1] = d, a[2] = f, a; if (1 === g){var h = b[0]; d = h.Za.width; f = h.Za.height; a = []; a[0] = c; a[1] = d; a[2] = f; return a}for (var k = a.nodeSpacing, l = a.rowSpacing, m = 270 === rq(a), n = 0, p = 0, q = 0, r = 0; r < g; r++)if (!(0 !== r % 2 || 1 < g && r === g - 1)){var h = b[r], s = h.Za, u = 0 === n?0:l; if (m){var v = Jq(h) - k, q = q - (u + s.height); h.na.p(c - (s.width + v), q); d = Math.max(d, s.width + v); f = Math.max(f, Math.abs(q))} else v = Jq(h) - k, p -= u + s.width, h.na.p(p, c - (s.height +
        v)), f = Math.max(f, s.height + v), d = Math.max(d, Math.abs(p)); n++}var n = 0, D = p, A = q; m?(p = c + k, q = 0):(p = 0, q = c + k); for (r = 0; r < g; r++)0 !== r % 2 && (h = b[r], s = h.Za, u = 0 === n?0:l, m?(v = Jq(h) - k, q -= u + s.height, h.na.p(p + v, q), d = Math.max(d, p + s.width + v), f = Math.max(f, Math.abs(q))):(v = Jq(h) - k, p -= u + s.width, h.na.p(p, q + v), f = Math.max(f, q + s.height + v), d = Math.max(d, Math.abs(p))), n++); 1 < g && 1 === g % 2 && (h = b[g - 1], s = h.Za, l = Kq(h, m?Math.max(Math.abs(A), Math.abs(q)):Math.max(Math.abs(D), Math.abs(p))), m?(h.na.p(c + k / 2 - h.O.x - h.Ia.x, - f - s.height - l), p = c +
        k / 2 - h.O.x - h.Ia.x, d = Math.max(d, p + s.width), 0 > p && (d -= p), f = Math.max(f, Math.abs(Math.min(A, q)) + l + s.height), 0 > h.na.x && (c = Qq(a, h.na.x, !1, c, k))):(h.na.p( - d - s.width - l, c + k / 2 - h.O.y - h.Ia.y), d = Math.max(d, Math.abs(Math.min(D, p)) + l + s.width), p = c + k / 2 - h.O.y - h.Ia.y, f = Math.max(f, p + s.height), 0 > p && (f -= p), 0 > h.na.y && (c = Qq(a, h.na.y, !0, c, k)))); for (r = 0; r < g; r++)h = b[r], m?h.na.p(h.na.x, h.na.y + f):h.na.p(h.na.x + d, h.na.y); a = []; a[0] = c; a[1] = d; a[2] = f; return a}
function Jq(a){e && t.l(a, Np, X, "fixRelativePostions:child"); return null === a.parent?0:a.parent.nodeSpacing}function Kq(a){e && t.l(a, Np, X, "fixRelativePostions:lastchild"); return null === a.parent?0:a.parent.rowSpacing}function Qq(a, b, c, d, f){e && t.l(a, Np, X, "fixRelativePostions:v"); a = a.children; for (var g = a.length, h = 0; h < g; h++)c?a[h].na.p(a[h].na.x, a[h].na.y - b):a[h].na.p(a[h].na.x - b, a[h].na.y); b = a[g - 1]; return Math.max(d, c?b.Ia.y + b.O.y - f / 2:b.Ia.x + b.O.x - f / 2)}
function Fq(a, b, c){e && t.l(a, Np, X, "calculateSubwidth:v"); switch (a.alignment){case hq:case Eq:var d = b; c + a.width > d && (d = c + a.width); 0 > c && (d -= c); return d; case sq:return a.width > b?a.width:b; case tq:return 2 * a.O.x > b?a.width:b + a.width - 2 * a.O.x; case jq:case Zp:return d = Math.min(0, c), c = Math.max(b, c + a.width), Math.max(a.width, c - d); case kq:return a.width - a.O.x + a.nodeSpacing / 2 + b; case lq:return Math.max(a.width, a.O.x + a.nodeSpacing / 2 + b); default:return b}}
function Gq(a, b, c){e && t.l(a, Np, X, "calculateSubheight:v"); switch (a.alignment){case hq:case Eq:var d = b; c + a.height > d && (d = c + a.height); 0 > c && (d -= c); return d; case sq:return a.height > b?a.height:b; case tq:return 2 * a.O.y > b?a.height:b + a.height - 2 * a.O.y; case jq:case Zp:return d = Math.min(0, c), c = Math.max(b, c + a.height), Math.max(a.height, c - d); case kq:return a.height - a.O.y + a.nodeSpacing / 2 + b; case lq:return Math.max(a.height, a.O.y + a.nodeSpacing / 2 + b); default:return b}}
function Hq(a, b, c){e && t.l(a, da, X, "alignOffset:align"); switch (a){case Eq:b /= 2; c /= 2; break; case hq:b /= 2; c /= 2; break; case sq:c = b = 0; break; case tq:break; default:t.m("Unhandled alignment value " + a.toString())}a = []; a[0] = b; a[1] = c; return a}function zq(a, b, c, d, f, g){e && t.l(a, Np, X, "shiftRelPosAlign:v"); e && t.l(b, da, X, "shiftRelPosAlign:align"); b = Hq(b, c, d); Cq(a, b[0], b[1], f, g)}function Cq(a, b, c, d, f){e && t.l(a, Np, X, "shiftRelPos:v"); if (0 !== b || 0 !== c)for (a = a.children; d <= f; d++){var g = a[d].na; g.x += b; g.y += c}}
function Aq(a, b, c, d){e && (t.l(b, Np, X, "recordMidPoints:v"), t.i(c, "number", X, "recordMidPoints:x"), t.i(d, "number", X, "recordMidPoints:y")); var f = b.parent; switch (a.Ff){case Jp:for (a = b.sc; a.next(); )b = a.value, b.fromVertex === f && b.Rr.p(c, d); break; case Rp:for (a = b.gc; a.next(); )b = a.value, b.toVertex === f && b.Rr.p(c, d); break; default:t.m("Unhandled path value " + a.Ff.toString())}}function Dq(a, b, c){for (var d = 0; d < a.length; d++){var f = a[d]; f.x += b; f.y += c}}
function Bq(a, b, c, d, f, g, h){e && t.l(b, Np, X, "mergeFringes:parent"); e && t.l(c, Np, X, "mergeFringes:child"); var k = rq(b), l = 90 === k || 270 === k, m = b.nodeSpacing; b = d; var n = f; d = g; f = h; var p = c.st, q = c.It; h = c.Za; var r = l?Math.max(f, h.height):Math.max(d, h.width); if (null === p || k !== rq(c))p = yq(a, 2), q = yq(a, 2), l?(p[0].p(0, 0), p[1].p(0, h.height), q[0].p(h.width, 0), q[1].p(q[0].x, p[1].y)):(p[0].p(0, 0), p[1].p(h.width, 0), q[0].p(0, h.height), q[1].p(p[1].x, q[0].y)); if (l){c = d; d = 9999999; if (!(null === n || 2 > n.length || null === p || 2 > p.length))for (g =
        f = 0; f < n.length && g < p.length; ){var k = n[f], s = p[g], l = s.x, u = s.y, l = l + c, v = k; f + 1 < n.length && (v = n[f + 1]); var D = s, s = D.x, D = D.y; g + 1 < p.length && (D = p[g + 1], s = D.x, D = D.y, s += c); var A = d; k.y === u?A = l - k.x:k.y > u && k.y < D?A = l + (k.y - u) / (D - u) * (s - l) - k.x:u > k.y && u < v.y && (A = l - (k.x + (u - k.y) / (v.y - k.y) * (v.x - k.x))); A < d && (d = A); v.y <= k.y?f++:D <= u?g++:(v.y <= D && f++, D <= v.y && g++)}c -= d; c += m; f = p; g = c; if (null === b || 2 > b.length || null === f || 2 > f.length)d = null; else{m = yq(a, b.length + f.length); for (d = l = k = 0; l < f.length && f[l].y < b[0].y; )u = f[l++], m[d++].p(u.x + g, u.y);
        for (; k < b.length; )u = b[k++], m[d++].p(u.x, u.y); for (k = b[b.length - 1].y; l < f.length && f[l].y <= k; )l++; for (; l < f.length && f[l].y > k; )u = f[l++], m[d++].p(u.x + g, u.y); f = yq(a, d); for (k = 0; k < d; k++)f[k].assign(m[k]); Iq(a, m); d = f}l = q; u = c; if (null === n || 2 > n.length || null === l || 2 > l.length)f = null; else{m = yq(a, n.length + l.length); for (g = v = f = 0; f < n.length && n[f].y < l[0].y; )k = n[f++], m[g++].p(k.x, k.y); for (; v < l.length; )k = l[v++], m[g++].p(k.x + u, k.y); for (l = l[l.length - 1].y; f < n.length && n[f].y <= l; )f++; for (; f < n.length && n[f].y > l; )k = n[f++], m[g++].p(k.x,
        k.y); k = yq(a, g); for (f = 0; f < g; f++)k[f].assign(m[f]); Iq(a, m); f = k}g = Math.max(0, c) + h.width; h = r} else{c = f; d = 9999999; if (!(null === n || 2 > n.length || null === p || 2 > p.length))for (g = f = 0; f < n.length && g < p.length; )k = n[f], s = p[g], l = s.x, u = s.y, u += c, v = k, f + 1 < n.length && (v = n[f + 1]), D = s, s = D.x, D = D.y, g + 1 < p.length && (D = p[g + 1], s = D.x, D = D.y, D += c), A = d, k.x === l?A = u - k.y:k.x > l && k.x < s?A = u + (k.x - l) / (s - l) * (D - u) - k.y:l > k.x && l < v.x && (A = u - (k.y + (l - k.x) / (v.x - k.x) * (v.y - k.y))), A < d && (d = A), v.x <= k.x?f++:s <= l?g++:(v.x <= s && f++, s <= v.x && g++); c -= d; c += m; f = p; g = c;
        if (null === b || 2 > b.length || null === f || 2 > f.length)d = null; else{m = yq(a, b.length + f.length); for (d = l = k = 0; l < f.length && f[l].x < b[0].x; )u = f[l++], m[d++].p(u.x, u.y + g); for (; k < b.length; )u = b[k++], m[d++].p(u.x, u.y); for (k = b[b.length - 1].x; l < f.length && f[l].x <= k; )l++; for (; l < f.length && f[l].x > k; )u = f[l++], m[d++].p(u.x, u.y + g); f = yq(a, d); for (k = 0; k < d; k++)f[k].assign(m[k]); Iq(a, m); d = f}l = q; u = c; if (null === n || 2 > n.length || null === l || 2 > l.length)f = null; else{m = yq(a, n.length + l.length); for (g = v = f = 0; f < n.length && n[f].x < l[0].x; )k = n[f++], m[g++].p(k.x,
        k.y); for (; v < l.length; )k = l[v++], m[g++].p(k.x, k.y + u); for (l = l[l.length - 1].x; f < n.length && n[f].x <= l; )f++; for (; f < n.length && n[f].x > l; )k = n[f++], m[g++].p(k.x, k.y); k = yq(a, g); for (f = 0; f < g; f++)k[f].assign(m[f]); Iq(a, m); f = k}g = r; h = Math.max(0, c) + h.height}Iq(a, b); Iq(a, p); Iq(a, n); Iq(a, q); a = []; a[0] = c; a[1] = d; a[2] = f; a[3] = g; a[4] = h; return a}function yq(a, b){a.ws || (a.ws = []); var c = a.ws[b]; if (void 0 !== c && (c = c.pop(), void 0 !== c))return c; for (var c = [], d = 0; d < b; d++)c[d] = new w; return c}
function Iq(a, b){if (a.ws){var c = b.length, d = a.ws[c]; void 0 === d && (d = [], a.ws[c] = d); d.push(b)}}
X.prototype.arrangeTrees = function(){if (this.bd === Qp)for (var a = this.Vc.k; a.next(); ){var b = a.value, c = b.Fc; if (null !== c){var d = c.position, c = d.x, d = d.y; isFinite(c) || (c = 0); isFinite(d) || (d = 0); Rq(this, b, c, d)}} else for (a = this.Dd, c = a.x, d = a.y, a = this.Vc.k; a.next(); )switch (b = a.value, Rq(this, b, c + b.Ia.x, d + b.Ia.y), this.bd){case Mp:d += b.Za.height + this.Zf.height; break; case Sq:c += b.Za.width + this.Zf.width; break; default:t.m("Unhandled arrangement value " + this.bd.toString())}};
        function Rq(a, b, c, d){if (null !== b){e && t.l(b, Np, X, "assignAbsolutePositions:v"); b.x = c; b.y = d; b = b.children; for (var f = b.length, g = 0; g < f; g++){var h = b[g]; Rq(a, h, c + h.na.x, d + h.na.y)}}}X.prototype.commitLayout = function(){this.cB(); this.commitNodes(); this.Uz(); this.qt && this.commitLinks()}; X.prototype.commitNodes = function(){for (var a = this.network.vertexes.k, b; a.next(); )b = a.value, b.commit(); for (a.reset(); a.next(); )b = a.value, this.layoutComments(b)};
        X.prototype.Uz = function(){if (this.Tw === Wp){for (var a = this.FB, b = [], c = null, d = this.network.vertexes.k; d.next(); ){var f = d.value; null === c?c = f.Ob.copy():c.kj(f.Ob); var g = b[f.level], g = void 0 === g?uq(f):Math.max(g, uq(f)); b[f.level] = g}for (d = 0; d < b.length; d++)void 0 === b[d] && (b[d] = 0); 90 === this.angle || 270 === this.angle?(c.Pf(this.nodeSpacing / 2, this.layerSpacing), f = new w( - this.nodeSpacing / 2, - this.layerSpacing / 2)):(c.Pf(this.layerSpacing, this.nodeSpacing / 2), f = new w( - this.layerSpacing / 2, - this.nodeSpacing / 2)); var g =
        [], c = 90 === this.angle || 270 === this.angle?c.width:c.height, h = 0; if (180 === this.angle || 270 === this.angle)for (d = 0; d < a.length; d++)h += a[d] + b[d]; for (d = 0; d < a.length; d++){var k = a[d] + b[d]; 270 === this.angle?(h -= k, g.push(new x(0, h, c, k))):90 === this.angle?(g.push(new x(0, h, c, k)), h += k):180 === this.angle?(h -= k, g.push(new x(h, 0, k, c))):(g.push(new x(h, 0, k, c)), h += k)}this.commitLayers(g, f)}}; X.prototype.commitLayers = function(){}; X.prototype.commitLinks = function(){for (var a = this.network.edges.k; a.next(); )a.value.commit()};
        X.prototype.cB = function(){for (var a = this.Vc.k; a.next(); )Tq(this, a.value)}; function Tq(a, b){if (null !== b){e && t.l(b, Np, X, "setPortSpotsTree:v"); a.setPortSpots(b); for (var c = b.children, d = c.length, f = 0; f < d; f++)Tq(a, c[f])}}
X.prototype.setPortSpots = function(a){e && t.l(a, Np, X, "setPortSpots:v"); var b = a.alignment; if (iq(b)){e && t.l(a, Np, X, "setPortSpotsBus:v"); e && t.l(b, da, X, "setPortSpots:align"); var c = this.Ff === Jp, d = rq(a), f; switch (d){case 0:f = Vb; break; case 90:f = Wb; break; case 180:f = Ub; break; default:f = Tb}var g = a.children, h = g.length; switch (b){case jq:case Zp:for (b = 0; b < h; b++){var k = g[b], k = c?k.sc:k.gc; if (k.next()){var l = k.value, l = l.link; if (null !== l){var m = 90 === d || 270 === d?Ub:Tb; if (1 === h || b === h - 1 && 1 === h % 2)switch (d){case 0:m = Ub; break;
        case 90:m = Tb; break; case 180:m = Vb; break; default:m = Wb} else 0 === b % 2 && (m = 90 === d || 270 === d?Vb:Wb); c?(a.setsPortSpot && (l.pb = f), a.setsChildPortSpot && (l.tb = m)):(a.setsPortSpot && (l.pb = m), a.setsChildPortSpot && (l.tb = f))}}}break; case kq:m = 90 === d || 270 === d?Vb:Wb; for (k = c?a.gc:a.sc; k.next(); )l = k.value, l = l.link, null !== l && (c?(a.setsPortSpot && (l.pb = f), a.setsChildPortSpot && (l.tb = m)):(a.setsPortSpot && (l.pb = m), a.setsChildPortSpot && (l.tb = f))); break; case lq:for (m = 90 === d || 270 === d?Ub:Tb, k = c?a.gc:a.sc; k.next(); )l = k.value, l =
        l.link, null !== l && (c?(a.setsPortSpot && (l.pb = f), a.setsChildPortSpot && (l.tb = m)):(a.setsPortSpot && (l.pb = m), a.setsChildPortSpot && (l.tb = f)))}} else if (c = rq(a), this.Ff === Jp)for (d = a.gc; d.next(); ){if (f = d.value, f = f.link, null !== f){if (a.setsPortSpot)if (a.portSpot.Nc())switch (c){case 0:f.pb = Vb; break; case 90:f.pb = Wb; break; case 180:f.pb = Ub; break; default:f.pb = Tb} else f.pb = a.portSpot; if (a.setsChildPortSpot)if (a.childPortSpot.Nc())switch (c){case 0:f.tb = Ub; break; case 90:f.tb = Tb; break; case 180:f.tb = Vb; break; default:f.tb =
Wb} else f.tb = a.childPortSpot}} else for (d = a.sc; d.next(); )if (f = d.value, f = f.link, null !== f){if (a.setsPortSpot)if (a.portSpot.Nc())switch (c){case 0:f.tb = Vb; break; case 90:f.tb = Wb; break; case 180:f.tb = Ub; break; default:f.tb = Tb} else f.tb = a.portSpot; if (a.setsChildPortSpot)if (a.childPortSpot.Nc())switch (c){case 0:f.pb = Ub; break; case 90:f.pb = Tb; break; case 180:f.pb = Vb; break; default:f.pb = Wb} else f.pb = a.childPortSpot}}; function rq(a){a = a.angle; return 45 >= a?0:135 >= a?90:225 >= a?180:315 >= a?270:0}
function uq(a){e && t.l(a, Np, X, "computeLayerSpacing:v"); var b = rq(a), b = 90 === b || 270 === b, c = a.layerSpacing; if (0 < a.layerSpacingParentOverlap)var d = Math.min(1, a.layerSpacingParentOverlap), c = c - (b?a.height * d:a.width * d); c < (b? - a.height: - a.width) && (c = b? - a.height: - a.width); return c}function vq(a){e && t.l(a, Np, X, "computeNodeIndent:v"); var b = rq(a), b = 90 === b || 270 === b, c = a.nodeIndent; if (0 < a.nodeIndentPastParent)var d = Math.min(1, a.nodeIndentPastParent), c = c + (b?a.width * d:a.height * d); return c = Math.max(0, c)}
t.g(X, "roots", X.prototype.JJ); t.defineProperty(X, {JJ:"roots"}, function(){return this.Vc}, function(a){this.Vc !== a && (t.l(a, C, X, "roots"), this.Vc = a, this.J())}); t.g(X, "path", X.prototype.path); t.defineProperty(X, {path:"path"}, function(){return this.Ii}, function(a){this.Ii !== a && (t.Aa(a, X, X, "path"), this.Ii = a, this.J())}); t.g(X, "treeStyle", X.prototype.JG);
        t.defineProperty(X, {JG:"treeStyle"}, function(){return this.Cs}, function(a){this.bd !== a && (t.Aa(a, X, X, "treeStyle"), a === Kp || a === bq || a === cq || a === aq) && (this.Cs = a, this.J())}); t.g(X, "layerStyle", X.prototype.Tw); t.defineProperty(X, {Tw:"layerStyle"}, function(){return this.Wu}, function(a){this.bd !== a && (t.Aa(a, X, X, "layerStyle"), a === Lp || a === Xp || a === Wp) && (this.Wu = a, this.J())}); t.g(X, "comments", X.prototype.comments);
        t.defineProperty(X, {comments:"comments"}, function(){return this.sh}, function(a){this.sh !== a && (t.i(a, "boolean", X, "comments"), this.sh = a, this.J())}); t.g(X, "arrangement", X.prototype.Qe); t.defineProperty(X, {Qe:"arrangement"}, function(){return this.bd}, function(a){this.bd !== a && (t.Aa(a, X, X, "arrangement"), a === Mp || a === Sq || a === Qp) && (this.bd = a, this.J())}); t.g(X, "arrangementSpacing", X.prototype.aw);
        t.defineProperty(X, {aw:"arrangementSpacing"}, function(){return this.Zf}, function(a){t.l(a, ga, X, "arrangementSpacing"); this.Zf.M(a) || (this.Zf.assign(a), this.J())}); t.g(X, "rootDefaults", X.prototype.IJ); t.defineProperty(X, {IJ:"rootDefaults"}, function(){return this.ua}, function(a){this.ua !== a && (t.l(a, Np, X, "rootDefaults"), this.ua = a, this.J())}); t.g(X, "alternateDefaults", X.prototype.LH);
        t.defineProperty(X, {LH:"alternateDefaults"}, function(){return this.ta}, function(a){this.ta !== a && (t.l(a, Np, X, "alternateDefaults"), this.ta = a, this.J())}); t.g(X, "sorting", X.prototype.sorting); t.defineProperty(X, {sorting:"sorting"}, function(){return this.ua.sorting}, function(a){this.ua.sorting !== a && (t.Aa(a, X, X, "sorting"), a === dq || a === eq || a === fq || gq) && (this.ua.sorting = a, this.J())}); t.g(X, "comparer", X.prototype.comparer);
        t.defineProperty(X, {comparer:"comparer"}, function(){return this.ua.comparer}, function(a){this.ua.comparer !== a && (t.i(a, "function", X, "comparer"), this.ua.comparer = a, this.J())}); t.g(X, "angle", X.prototype.angle); t.defineProperty(X, {angle:"angle"}, function(){return this.ua.angle}, function(a){this.ua.angle !== a && (t.i(a, "number", X, "angle"), 0 === a || 90 === a || 180 === a || 270 === a) && (this.ua.angle = a, this.J())}); t.g(X, "alignment", X.prototype.alignment);
        t.defineProperty(X, {alignment:"alignment"}, function(){return this.ua.alignment}, function(a){this.ua.alignment !== a && (t.Aa(a, X, X, "alignment"), this.ua.alignment = a, this.J())}); t.g(X, "nodeIndent", X.prototype.nodeIndent); t.defineProperty(X, {nodeIndent:"nodeIndent"}, function(){return this.ua.nodeIndent}, function(a){this.ua.nodeIndent !== a && (t.i(a, "number", X, "nodeIndent"), 0 <= a && (this.ua.nodeIndent = a, this.J()))}); t.g(X, "nodeIndentPastParent", X.prototype.nodeIndentPastParent);
        t.defineProperty(X, {nodeIndentPastParent:"nodeIndentPastParent"}, function(){return this.ua.nodeIndentPastParent}, function(a){this.ua.nodeIndentPastParent !== a && (t.i(a, "number", X, "nodeIndentPastParent"), 0 <= a && 1 >= a && (this.ua.nodeIndentPastParent = a, this.J()))}); t.g(X, "nodeSpacing", X.prototype.nodeSpacing); t.defineProperty(X, {nodeSpacing:"nodeSpacing"}, function(){return this.ua.nodeSpacing}, function(a){this.ua.nodeSpacing !== a && (t.i(a, "number", X, "nodeSpacing"), this.ua.nodeSpacing = a, this.J())});
        t.g(X, "layerSpacing", X.prototype.layerSpacing); t.defineProperty(X, {layerSpacing:"layerSpacing"}, function(){return this.ua.layerSpacing}, function(a){this.ua.layerSpacing !== a && (t.i(a, "number", X, "layerSpacing"), this.ua.layerSpacing = a, this.J())}); t.g(X, "layerSpacingParentOverlap", X.prototype.layerSpacingParentOverlap);
        t.defineProperty(X, {layerSpacingParentOverlap:"layerSpacingParentOverlap"}, function(){return this.ua.layerSpacingParentOverlap}, function(a){this.ua.layerSpacingParentOverlap !== a && (t.i(a, "number", X, "layerSpacingParentOverlap"), 0 <= a && 1 >= a && (this.ua.layerSpacingParentOverlap = a, this.J()))}); t.g(X, "compaction", X.prototype.compaction);
        t.defineProperty(X, {compaction:"compaction"}, function(){return this.ua.compaction}, function(a){this.ua.compaction !== a && (t.Aa(a, X, X, "compaction"), a === oq || a === qq) && (this.ua.compaction = a, this.J())}); t.g(X, "breadthLimit", X.prototype.breadthLimit); t.defineProperty(X, {breadthLimit:"breadthLimit"}, function(){return this.ua.breadthLimit}, function(a){this.ua.breadthLimit !== a && (t.i(a, "number", X, "breadthLimit"), 0 <= a && (this.ua.breadthLimit = a, this.J()))}); t.g(X, "rowSpacing", X.prototype.rowSpacing);
        t.defineProperty(X, {rowSpacing:"rowSpacing"}, function(){return this.ua.rowSpacing}, function(a){this.ua.rowSpacing !== a && (t.i(a, "number", X, "rowSpacing"), this.ua.rowSpacing = a, this.J())}); t.g(X, "rowIndent", X.prototype.rowIndent); t.defineProperty(X, {rowIndent:"rowIndent"}, function(){return this.ua.rowIndent}, function(a){this.ua.rowIndent !== a && (t.i(a, "number", X, "rowIndent"), 0 <= a && (this.ua.rowIndent = a, this.J()))}); t.g(X, "commentSpacing", X.prototype.commentSpacing);
        t.defineProperty(X, {commentSpacing:"commentSpacing"}, function(){return this.ua.commentSpacing}, function(a){this.ua.commentSpacing !== a && (t.i(a, "number", X, "commentSpacing"), this.ua.commentSpacing = a, this.J())}); t.g(X, "commentMargin", X.prototype.commentMargin); t.defineProperty(X, {commentMargin:"commentMargin"}, function(){return this.ua.commentMargin}, function(a){this.ua.commentMargin !== a && (t.i(a, "number", X, "commentMargin"), this.ua.commentMargin = a, this.J())}); t.g(X, "setsPortSpot", X.prototype.setsPortSpot);
        t.defineProperty(X, {setsPortSpot:"setsPortSpot"}, function(){return this.ua.setsPortSpot}, function(a){this.ua.setsPortSpot !== a && (t.i(a, "boolean", X, "setsPortSpot"), this.ua.setsPortSpot = a, this.J())}); t.g(X, "portSpot", X.prototype.portSpot); t.defineProperty(X, {portSpot:"portSpot"}, function(){return this.ua.portSpot}, function(a){t.l(a, I, X, "portSpot"); this.ua.portSpot.M(a) || (this.ua.portSpot = a, this.J())}); t.g(X, "setsChildPortSpot", X.prototype.setsChildPortSpot);
        t.defineProperty(X, {setsChildPortSpot:"setsChildPortSpot"}, function(){return this.ua.setsChildPortSpot}, function(a){this.ua.setsChildPortSpot !== a && (t.i(a, "boolean", X, "setsChildPortSpot"), this.ua.setsChildPortSpot = a, this.J())}); t.g(X, "childPortSpot", X.prototype.childPortSpot); t.defineProperty(X, {childPortSpot:"childPortSpot"}, function(){return this.ua.childPortSpot}, function(a){t.l(a, I, X, "childPortSpot"); this.ua.childPortSpot.M(a) || (this.ua.childPortSpot = a, this.J())}); t.g(X, "alternateSorting", X.prototype.WH);
        t.defineProperty(X, {WH:"alternateSorting"}, function(){return this.ta.sorting}, function(a){this.ta.sorting !== a && (t.Aa(a, X, X, "alternateSorting"), a === dq || a === eq || a === fq || gq) && (this.ta.sorting = a, this.J())}); t.g(X, "alternateComparer", X.prototype.KH); t.defineProperty(X, {KH:"alternateComparer"}, function(){return this.ta.comparer}, function(a){this.ta.comparer !== a && (t.i(a, "function", X, "alternateComparer"), this.ta.comparer = a, this.J())}); t.g(X, "alternateAngle", X.prototype.EH);
        t.defineProperty(X, {EH:"alternateAngle"}, function(){return this.ta.angle}, function(a){this.ta.angle !== a && (t.i(a, "number", X, "alternateAngle"), 0 === a || 90 === a || 180 === a || 270 === a) && (this.ta.angle = a, this.J())}); t.g(X, "alternateAlignment", X.prototype.DH); t.defineProperty(X, {DH:"alternateAlignment"}, function(){return this.ta.alignment}, function(a){this.ta.alignment !== a && (t.Aa(a, X, X, "alternateAlignment"), this.ta.alignment = a, this.J())}); t.g(X, "alternateNodeIndent", X.prototype.OH);
        t.defineProperty(X, {OH:"alternateNodeIndent"}, function(){return this.ta.nodeIndent}, function(a){this.ta.nodeIndent !== a && (t.i(a, "number", X, "alternateNodeIndent"), 0 <= a && (this.ta.nodeIndent = a, this.J()))}); t.g(X, "alternateNodeIndentPastParent", X.prototype.PH);
        t.defineProperty(X, {PH:"alternateNodeIndentPastParent"}, function(){return this.ta.nodeIndentPastParent}, function(a){this.ta.nodeIndentPastParent !== a && (t.i(a, "number", X, "alternateNodeIndentPastParent"), 0 <= a && 1 >= a && (this.ta.nodeIndentPastParent = a, this.J()))}); t.g(X, "alternateNodeSpacing", X.prototype.QH); t.defineProperty(X, {QH:"alternateNodeSpacing"}, function(){return this.ta.nodeSpacing}, function(a){this.ta.nodeSpacing !== a && (t.i(a, "number", X, "alternateNodeSpacing"), this.ta.nodeSpacing = a, this.J())});
        t.g(X, "alternateLayerSpacing", X.prototype.MH); t.defineProperty(X, {MH:"alternateLayerSpacing"}, function(){return this.ta.layerSpacing}, function(a){this.ta.layerSpacing !== a && (t.i(a, "number", X, "alternateLayerSpacing"), this.ta.layerSpacing = a, this.J())}); t.g(X, "alternateLayerSpacingParentOverlap", X.prototype.NH);
        t.defineProperty(X, {NH:"alternateLayerSpacingParentOverlap"}, function(){return this.ta.layerSpacingParentOverlap}, function(a){this.ta.layerSpacingParentOverlap !== a && (t.i(a, "number", X, "alternateLayerSpacingParentOverlap"), 0 <= a && 1 >= a && (this.ta.layerSpacingParentOverlap = a, this.J()))}); t.g(X, "alternateCompaction", X.prototype.JH);
        t.defineProperty(X, {JH:"alternateCompaction"}, function(){return this.ta.compaction}, function(a){this.ta.compaction !== a && (t.Aa(a, X, X, "alternateCompaction"), a === oq || a === qq) && (this.ta.compaction = a, this.J())}); t.g(X, "alternateBreadthLimit", X.prototype.FH); t.defineProperty(X, {FH:"alternateBreadthLimit"}, function(){return this.ta.breadthLimit}, function(a){this.ta.breadthLimit !== a && (t.i(a, "number", X, "alternateBreadthLimit"), 0 <= a && (this.ta.breadthLimit = a, this.J()))}); t.g(X, "alternateRowSpacing", X.prototype.TH);
        t.defineProperty(X, {TH:"alternateRowSpacing"}, function(){return this.ta.rowSpacing}, function(a){this.ta.rowSpacing !== a && (t.i(a, "number", X, "alternateRowSpacing"), this.ta.rowSpacing = a, this.J())}); t.g(X, "alternateRowIndent", X.prototype.SH); t.defineProperty(X, {SH:"alternateRowIndent"}, function(){return this.ta.rowIndent}, function(a){this.ta.rowIndent !== a && (t.i(a, "number", X, "alternateRowIndent"), 0 <= a && (this.ta.rowIndent = a, this.J()))}); t.g(X, "alternateCommentSpacing", X.prototype.IH);
        t.defineProperty(X, {IH:"alternateCommentSpacing"}, function(){return this.ta.commentSpacing}, function(a){this.ta.commentSpacing !== a && (t.i(a, "number", X, "alternateCommentSpacing"), this.ta.commentSpacing = a, this.J())}); t.g(X, "alternateCommentMargin", X.prototype.HH); t.defineProperty(X, {HH:"alternateCommentMargin"}, function(){return this.ta.commentMargin}, function(a){this.ta.commentMargin !== a && (t.i(a, "number", X, "alternateCommentMargin"), this.ta.commentMargin = a, this.J())}); t.g(X, "alternateSetsPortSpot", X.prototype.VH);
        t.defineProperty(X, {VH:"alternateSetsPortSpot"}, function(){return this.ta.setsPortSpot}, function(a){this.ta.setsPortSpot !== a && (t.i(a, "boolean", X, "alternateSetsPortSpot"), this.ta.setsPortSpot = a, this.J())}); t.g(X, "alternatePortSpot", X.prototype.RH); t.defineProperty(X, {RH:"alternatePortSpot"}, function(){return this.ta.portSpot}, function(a){t.l(a, I, X, "alternatePortSpot"); this.ta.portSpot.M(a) || (this.ta.portSpot = a, this.J())}); t.g(X, "alternateSetsChildPortSpot", X.prototype.UH);
        t.defineProperty(X, {UH:"alternateSetsChildPortSpot"}, function(){return this.ta.setsChildPortSpot}, function(a){this.ta.setsChildPortSpot !== a && (t.i(a, "boolean", X, "alternateSetsChildPortSpot"), this.ta.setsChildPortSpot = a, this.J())}); t.g(X, "alternateChildPortSpot", X.prototype.GH); t.defineProperty(X, {GH:"alternateChildPortSpot"}, function(){return this.ta.childPortSpot}, function(a){t.l(a, I, X, "alternateChildPortSpot"); this.ta.childPortSpot.M(a) || (this.ta.childPortSpot = a, this.J())}); var Ip;
        X.PathDefault = Ip = t.w(X, "PathDefault", - 1); var Jp; X.PathDestination = Jp = t.w(X, "PathDestination", 0); var Rp; X.PathSource = Rp = t.w(X, "PathSource", 1); var dq; X.SortingForwards = dq = t.w(X, "SortingForwards", 10); var eq; X.SortingReverse = eq = t.w(X, "SortingReverse", 11); var fq; X.SortingAscending = fq = t.w(X, "SortingAscending", 12); var gq; X.SortingDescending = gq = t.w(X, "SortingDescending", 13); var Eq; X.AlignmentCenterSubtrees = Eq = t.w(X, "AlignmentCenterSubtrees", 20); var hq;
        X.AlignmentCenterChildren = hq = t.w(X, "AlignmentCenterChildren", 21); var sq; X.AlignmentStart = sq = t.w(X, "AlignmentStart", 22); var tq; X.AlignmentEnd = tq = t.w(X, "AlignmentEnd", 23); var jq; X.AlignmentBus = jq = t.w(X, "AlignmentBus", 24); var Zp; X.AlignmentBusBranching = Zp = t.w(X, "AlignmentBusBranching", 25); var kq; X.AlignmentTopLeftBus = kq = t.w(X, "AlignmentTopLeftBus", 26); var lq; X.AlignmentBottomRightBus = lq = t.w(X, "AlignmentBottomRightBus", 27); var oq; X.CompactionNone = oq = t.w(X, "CompactionNone", 30); var qq;
        X.CompactionBlock = qq = t.w(X, "CompactionBlock", 31); var Kp; X.StyleLayered = Kp = t.w(X, "StyleLayered", 40); var cq; X.StyleLastParents = cq = t.w(X, "StyleLastParents", 41); var bq; X.StyleAlternating = bq = t.w(X, "StyleAlternating", 42); var aq; X.StyleRootOnly = aq = t.w(X, "StyleRootOnly", 43); var Mp; X.ArrangementVertical = Mp = t.w(X, "ArrangementVertical", 50); var Sq; X.ArrangementHorizontal = Sq = t.w(X, "ArrangementHorizontal", 51); var Qp; X.ArrangementFixedRoots = Qp = t.w(X, "ArrangementFixedRoots", 52); var Lp;
        X.LayerIndividual = Lp = t.w(X, "LayerIndividual", 60); var Xp; X.LayerSiblings = Xp = t.w(X, "LayerSiblings", 61); var Wp; X.LayerUniform = Wp = t.w(X, "LayerUniform", 62); function Op(){ra.call(this)}t.ga("TreeNetwork", Op); t.Ka(Op, ra); Op.prototype.createVertex = function(){return new Np}; Op.prototype.createEdge = function(){return new Uq};
        function Np(){ta.call(this); this.initialized = !1; this.parent = null; this.children = []; this.maxGenerationCount = this.maxChildrenCount = this.descendantCount = this.level = 0; this.comments = null; this.na = new w(0, 0); this.Za = new ga(0, 0); this.Ia = new w(0, 0); this.Op = this.Np = this.KJ = !1; this.It = this.st = null; this.sorting = dq; this.comparer = Qn; this.angle = 0; this.alignment = hq; this.nodeIndentPastParent = this.nodeIndent = 0; this.nodeSpacing = 20; this.layerSpacing = 50; this.layerSpacingParentOverlap = 0; this.compaction = qq; this.breadthLimit =
                0; this.rowSpacing = 25; this.commentSpacing = this.rowIndent = 10; this.commentMargin = 20; this.setsPortSpot = !0; this.portSpot = xb; this.setsChildPortSpot = !0; this.childPortSpot = xb}t.ga("TreeVertex", Np); t.Ka(Np, ta);
        Np.prototype.copyInheritedPropertiesFrom = function(a){null !== a && (this.sorting = a.sorting, this.comparer = a.comparer, this.angle = a.angle, this.alignment = a.alignment, this.nodeIndent = a.nodeIndent, this.nodeIndentPastParent = a.nodeIndentPastParent, this.nodeSpacing = a.nodeSpacing, this.layerSpacing = a.layerSpacing, this.layerSpacingParentOverlap = a.layerSpacingParentOverlap, this.compaction = a.compaction, this.breadthLimit = a.breadthLimit, this.rowSpacing = a.rowSpacing, this.rowIndent = a.rowIndent, this.commentSpacing = a.commentSpacing,
                this.commentMargin = a.commentMargin, this.setsPortSpot = a.setsPortSpot, this.portSpot = a.portSpot, this.setsChildPortSpot = a.setsChildPortSpot, this.childPortSpot = a.childPortSpot)}; t.A(Np, {Fm:"childrenCount"}, function(){return this.children.length}); t.g(Np, "relativePosition", Np.prototype.EJ); t.defineProperty(Np, {EJ:"relativePosition"}, function(){return this.na}, function(a){this.na.set(a)}); t.g(Np, "subtreeSize", Np.prototype.XJ); t.defineProperty(Np, {XJ:"subtreeSize"}, function(){return this.Za}, function(a){this.Za.set(a)});
        t.g(Np, "subtreeOffset", Np.prototype.WJ); t.defineProperty(Np, {WJ:"subtreeOffset"}, function(){return this.Ia}, function(a){this.Ia.set(a)}); function Uq(){ua.call(this); this.Rr = new w(0, 0)}t.ga("TreeEdge", Uq); t.Ka(Uq, ua);
        Uq.prototype.commit = function(){var a = this.link; if (null !== a && !a.cj){var b = this.network.jc, c = null, d = null; switch (b.Ff){case Jp:c = this.fromVertex; d = this.toVertex; break; case Rp:c = this.toVertex; d = this.fromVertex; break; default:t.m("Unhandled path value " + b.Ff.toString())}if (null !== c && null !== d)if (b = this.Rr, 0 !== b.x || 0 !== b.y || c.KJ){var d = c.Ob, f = rq(c), g = uq(c), h = c.rowSpacing; a.updateRoute(); var k = a.De === Pg, l = a.ic, m, n, p, q; a.yl(); if (l || k){for (m = 2; 4 < a.oa; )a.NF(2); n = a.o(1); p = a.o(2)} else{for (m = 1; 3 < a.oa; )a.NF(1); n =
                a.o(0); p = a.o(a.oa - 1)}q = a.o(a.oa - 1); 0 === f?(c.alignment === tq?(f = d.bottom + b.y, 0 === b.y && n.y > q.y + c.rowIndent && (f = Math.min(f, Math.max(n.y, f - vq(c))))):c.alignment === sq?(f = d.top + b.y, 0 === b.y && n.y < q.y - c.rowIndent && (f = Math.max(f, Math.min(n.y, f + vq(c))))):f = c.Np || c.Op && 1 === c.maxGenerationCount?d.top - c.Ia.y + b.y:d.y + d.height / 2 + b.y, k?(a.C(m, n.x, f), m++, a.C(m, d.right + g, f), m++, a.C(m, d.right + g + (b.x - h) / 3, f), m++, a.C(m, d.right + g + 2 * (b.x - h) / 3, f), m++, a.C(m, d.right + g + (b.x - h), f), m++, a.C(m, p.x, f)):(l && (a.C(m, d.right + g / 2, n.y),
                m++), a.C(m, d.right + g / 2, f), m++, a.C(m, d.right + g + b.x - (l?h / 2:h), f), m++, l && a.C(m, a.o(m - 1).x, p.y))):90 === f?(c.alignment === tq?(f = d.right + b.x, 0 === b.x && n.x > q.x + c.rowIndent && (f = Math.min(f, Math.max(n.x, f - vq(c))))):c.alignment === sq?(f = d.left + b.x, 0 === b.x && n.x < q.x - c.rowIndent && (f = Math.max(f, Math.min(n.x, f + vq(c))))):f = c.Np || c.Op && 1 === c.maxGenerationCount?d.left - c.Ia.x + b.x:d.x + d.width / 2 + b.x, k?(a.C(m, f, n.y), m++, a.C(m, f, d.bottom + g), m++, a.C(m, f, d.bottom + g + (b.y - h) / 3), m++, a.C(m, f, d.bottom + g + 2 * (b.y - h) / 3), m++, a.C(m, f, d.bottom +
                g + (b.y - h)), m++, a.C(m, f, p.y)):(l && (a.C(m, n.x, d.bottom + g / 2), m++), a.C(m, f, d.bottom + g / 2), m++, a.C(m, f, d.bottom + g + b.y - (l?h / 2:h)), m++, l && a.C(m, p.x, a.o(m - 1).y))):180 === f?(c.alignment === tq?(f = d.bottom + b.y, 0 === b.y && n.y > q.y + c.rowIndent && (f = Math.min(f, Math.max(n.y, f - vq(c))))):c.alignment === sq?(f = d.top + b.y, 0 === b.y && n.y < q.y - c.rowIndent && (f = Math.max(f, Math.min(n.y, f + vq(c))))):f = c.Np || c.Op && 1 === c.maxGenerationCount?d.top - c.Ia.y + b.y:d.y + d.height / 2 + b.y, k?(a.C(m, n.x, f), m++, a.C(m, d.left - g, f), m++, a.C(m, d.left - g + (b.x +
                h) / 3, f), m++, a.C(m, d.left - g + 2 * (b.x + h) / 3, f), m++, a.C(m, d.left - g + (b.x + h), f), m++, a.C(m, p.x, f)):(l && (a.C(m, d.left - g / 2, n.y), m++), a.C(m, d.left - g / 2, f), m++, a.C(m, d.left - g + b.x + (l?h / 2:h), f), m++, l && a.C(m, a.o(m - 1).x, p.y))):270 === f?(c.alignment === tq?(f = d.right + b.x, 0 === b.x && n.x > q.x + c.rowIndent && (f = Math.min(f, Math.max(n.x, f - vq(c))))):c.alignment === sq?(f = d.left + b.x, 0 === b.x && n.x < q.x - c.rowIndent && (f = Math.max(f, Math.min(n.x, f + vq(c))))):f = c.Np || c.Op && 1 === c.maxGenerationCount?d.left - c.Ia.x + b.x:d.x + d.width / 2 + b.x, k?(a.C(m,
                f, n.y), m++, a.C(m, f, d.top - g), m++, a.C(m, f, d.top - g + (b.y + h) / 3), m++, a.C(m, f, d.top - g + 2 * (b.y + h) / 3), m++, a.C(m, f, d.top - g + (b.y + h)), m++, a.C(m, f, p.y)):(l && (a.C(m, n.x, d.top - g / 2), m++), a.C(m, f, d.top - g / 2), m++, a.C(m, f, d.top - g + b.y + (l?h / 2:h)), m++, l && a.C(m, p.x, a.o(m - 1).y))):t.m("Invalid angle " + f); a.Vi()} else g = c, h = d, e && t.l(g, Np, Uq, "adjustRouteForAngleChange:parent"), e && t.l(h, Np, Uq, "adjustRouteForAngleChange:child"), a = this.link, c = rq(g), c !== rq(h) && (b = uq(g), d = g.Ob, g = h.Ob, 0 === c && g.left - d.right < b + 1 || 90 === c && g.top - d.bottom <
                b + 1 || 180 === c && d.left - g.right < b + 1 || 270 === c && d.top - g.bottom < b + 1 || (a.updateRoute(), g = a.De === Pg, h = a.ic, k = iq(this.fromVertex.alignment), a.yl(), 0 === c?(c = d.right + b / 2, g?4 === a.oa && (b = a.o(3).y, a.Y(1, c - 20, a.o(1).y), a.C(2, c - 20, b), a.C(3, c, b), a.C(4, c + 20, b), a.Y(5, a.o(5).x, b)):h?k?a.Y(3, a.o(2).x, a.o(4).y):6 === a.oa && (a.Y(2, c, a.o(2).y), a.Y(3, c, a.o(3).y)):4 === a.oa?a.C(2, c, a.o(2).y):3 === a.oa?a.Y(1, c, a.o(2).y):2 === a.oa && a.C(1, c, a.o(1).y)):90 === c?(b = d.bottom + b / 2, g?4 === a.oa && (c = a.o(3).x, a.Y(1, a.o(1).x, b - 20), a.C(2, c, b - 20),
                        a.C(3, c, b), a.C(4, c, b + 20), a.Y(5, c, a.o(5).y)):h?k?a.Y(3, a.o(2).x, a.o(4).y):6 === a.oa && (a.Y(2, a.o(2).x, b), a.Y(3, a.o(3).x, b)):4 === a.oa?a.C(2, a.o(2).x, b):3 === a.oa?a.Y(1, a.o(2).x, b):2 === a.oa && a.C(1, a.o(1).x, b)):180 === c?(c = d.left - b / 2, g?4 === a.oa && (b = a.o(3).y, a.Y(1, c + 20, a.o(1).y), a.C(2, c + 20, b), a.C(3, c, b), a.C(4, c - 20, b), a.Y(5, a.o(5).x, b)):h?k?a.Y(3, a.o(2).x, a.o(4).y):6 === a.oa && (a.Y(2, c, a.o(2).y), a.Y(3, c, a.o(3).y)):4 === a.oa?a.C(2, c, a.o(2).y):3 === a.oa?a.Y(1, c, a.o(2).y):2 === a.oa && a.C(1, c, a.o(1).y)):270 === c && (b =
                        d.top - b / 2, g?4 === a.oa && (c = a.o(3).x, a.Y(1, a.o(1).x, b + 20), a.C(2, c, b + 20), a.C(3, c, b), a.C(4, c, b - 20), a.Y(5, c, a.o(5).y)):h?k?a.Y(3, a.o(2).x, a.o(4).y):6 === a.oa && (a.Y(2, a.o(2).x, b), a.Y(3, a.o(3).x, b)):4 === a.oa?a.C(2, a.o(2).x, b):3 === a.oa?a.Y(1, a.o(2).x, b):2 === a.oa && a.C(1, a.o(1).x, b)), a.Vi()))}}; t.g(Uq, "relativePoint", Uq.prototype.DJ); t.defineProperty(Uq, {DJ:"relativePoint"}, function(){return this.Rr}, function(a){this.Rr.set(a)}); function Vq(){this.Wn = []}
function Rk(a){var b = new Vq, c; if ("string" === typeof a)c = (new DOMParser).parseFromString(a, "text/xml"); else if (a instanceof Document)c = a.implementation.createDocument("http://www.w3.org/2000/svg", "svg", null), c.appendChild(c.importNode(a.documentElement, !0)); else return null; a = c.getElementsByTagName("svg"); if (0 === a.length)return null; var d = a[0], f = c.getElementsByTagName("linearGradient"), g = c.getElementsByTagName("radialGradient"); for (a = 0; a < f.length; a++){for (var h = f[a], k = Sk(fa, Zd, {start:Xb, end:Yb}), l =
        h.childNodes, m = 0; m < l.length; m++)if ("stop" === l[m].tagName){var n = Wq(b, l[m], "stop-color"); if (n){var p = Wq(b, l[m], "offset"); p || (p = "0"); var q = parseFloat(p); isNaN(q) && (q = 0); k.addColorStop(( - 1 !== p.indexOf("%")?0.01:1) * q, n)}}h = h.getAttribute("id"); "string" === typeof h && (b["_brush" + h] = k)}for (a = 0; a < g.length; a++){h = g[a]; k = Sk(fa, $d, {start:Kb, end:Kb}); l = h.childNodes; for (m = 0; m < l.length; m++)"stop" === l[m].tagName && (n = Wq(b, l[m], "stop-color")) && ((p = Wq(b, l[m], "offset")) || (p = "0"), q = parseFloat(p), isNaN(q) && (q = 0), k.addColorStop(( - 1 !==
        p.indexOf("%")?0.01:1) * q, n)); h = h.getAttribute("id"); "string" === typeof h && (b["_brush" + h] = k)}for (f = !0; f; )for (f = !1, g = c.getElementsByTagName("use"), a = 0; a < g.length; a++)k = g[a], 0 === k.childNodes.length && (h = k.href, void 0 !== h && (h = c.getElementById(h.baseVal.substring(1)), null !== h && (h = h.cloneNode(!0), h.removeAttribute("id"), l = parseFloat(k.getAttribute("x")), isNaN(l) && (l = 0), m = parseFloat(k.getAttribute("y")), isNaN(m) && (m = 0), n = k.getAttribute("transform"), null === n && (n = ""), k.setAttribute("transform", n + " translate(" +
        l + "," + m + ")"), k.appendChild(h), "use" === h.tagName && (f = !0)))); Xq(b, d, null); c = new y; if (0 === b.Wn.length)return c; if (1 === b.Wn.length)return b.Wn[0]; for (a = 0; a < b.Wn.length; a++)c.add(b.Wn[a]); return c}function Yq(a, b){var c = a.getAttribute(b); "string" !== typeof c && a.style && (c = a.style[b]); return"string" !== typeof c?null:c}
function Wq(a, b, c){var d = b.getAttribute(c); "string" !== typeof d && b.style && (d = b.style[c]); return"string" !== typeof d || "" === d || "inherit" === d?(b = b.parentNode, "g" === b.tagName || "use" === b.tagName?Wq(a, b, c):null):d}
function Xq(a, b, c){var d = b.tagName; if (("g" === d || "svg" === d || "use" === d || "symbol" === d) && "none" !== Wq(a, b, "display")){for (var d = b.childNodes, f = 0; f < d.length; f++){var g = d[f], h = null; if (void 0 !== g.getAttribute){var k = g.getAttribute("transform"); switch (g.tagName){case "g":null === k?Xq(a, g, null):(h = new y, Xq(a, g, h)); break; case "use":null === k?Xq(a, g, null):(h = new y, Xq(a, g, h)); break; case "symbol":if ("use" !== b.tagName)break; h = new y; Xq(a, g, h); var l = h, m = a, n = g; Wq(m, n, "preserveAspectRatio"); Wq(m, n, "viewBox"); l.scale =
        1; break; case "path":l = g; h = new W; l = l.getAttribute("d"); "string" === typeof l && (h.HE = Qc(l)); break; case "line":var p = g, h = new W, l = parseFloat(p.getAttribute("x1")); isNaN(l) && (l = 0); m = parseFloat(p.getAttribute("y1")); isNaN(m) && (m = 0); n = parseFloat(p.getAttribute("x2")); isNaN(n) && (n = 0); p = parseFloat(p.getAttribute("y2")); isNaN(p) && (p = 0); var q = new zc(Dc); h.position = new w(Math.min(l, n), Math.min(m, p)); 0 < (n - l) / (p - m)?(q.qa = 0, q.ra = 0, q.D = Math.abs(n - l), q.F = Math.abs(p - m)):(q.qa = 0, q.ra = Math.abs(p - m), q.D = Math.abs(n - l), q.F =
        0); h.nd = q; break; case "circle":n = g; h = new W; l = parseFloat(n.getAttribute("r")); isNaN(l) || 0 > l?h = null:(m = parseFloat(n.getAttribute("cx")), isNaN(m) && (m = 0), n = parseFloat(n.getAttribute("cy")), isNaN(n) && (n = 0), p = new zc(Mc), p.qa = 0, p.ra = 0, p.D = 2 * l, p.F = 2 * l, h.position = new w(m - l, n - l), h.nd = p); break; case "ellipse":p = g; h = new W; l = parseFloat(p.getAttribute("rx")); isNaN(l) || 0 > l?h = null:(m = parseFloat(p.getAttribute("ry")), isNaN(m) || 0 > m?h = null:(n = parseFloat(p.getAttribute("cx")), isNaN(n) && (n = 0), p = parseFloat(p.getAttribute("cy")),
        isNaN(p) && (p = 0), q = new zc(Mc), q.qa = 0, q.ra = 0, q.D = 2 * l, q.F = 2 * m, h.position = new w(n - l, p - m), h.nd = q)); break; case "rect":q = g; h = new W; l = parseFloat(q.getAttribute("width")); if (isNaN(l) || 0 > l)h = null; else if (m = parseFloat(q.getAttribute("height")), isNaN(m) || 0 > m)h = null; else{n = parseFloat(q.getAttribute("x")); isNaN(n) && (n = 0); p = parseFloat(q.getAttribute("y")); isNaN(p) && (p = 0); var r = q.getAttribute("rx"), s = q.getAttribute("ry"), q = parseFloat(r); if (isNaN(q) || 0 > q)q = 0; var u = parseFloat(s); if (isNaN(u) || 0 > u)u = 0; !r && s?q = u:r && !s &&
        (u = q); q = Math.min(q, l / 2); u = Math.min(u, m / 2); s = void 0; 0 === q && 0 === u?(s = new zc(Ec), s.qa = 0, s.ra = 0, s.D = l, s.F = m):(s = H.va / 2, r = t.u(), J(r, q, 0, !0), r.lineTo(l - q, 0), K(r, l - q * s, 0, l, u * s, l, u), r.lineTo(l, m - u), K(r, l, m - u * s, l - q * s, m, l - q, m), r.lineTo(q, m), K(r, q * s, m, 0, m - u * s, 0, m - u), r.lineTo(0, u), K(r, 0, u * s, q * s, 0, q, 0), M(r), s = r.s, t.v(r)); h.position = new w(n, p); h.nd = s}break; case "polygon":h = Zq(g); break; case "polyline":h = Zq(g)}if (null !== h){if (h instanceof W){l = Wq(a, g, "fill"); null !== l && - 1 !== l.indexOf("url")?(l = l.substring(l.indexOf("#") +
        1, l.length - 1), l = a["_brush" + l], h.fill = l instanceof fa?l:"black"):h.fill = null === l?"black":"none" === l?null:l; l = Wq(a, g, "stroke"); null !== l && - 1 !== l.indexOf("url")?(l = l.substring(l.indexOf("#") + 1, l.length - 1), l = a["_brush" + l], h.stroke = l instanceof fa?l:"black"):h.stroke = "none" === l?null:l; l = parseFloat(Wq(a, g, "stroke-width")); isNaN(l) || (h.fb = l); l = Wq(a, g, "stroke-linecap"); null !== l && (h.tG = l); if (l = Wq(a, g, "stroke-dasharray")){m = l.split(","); n = []; for (l = 0; l < m.length; l++)p = parseFloat(m[l]), !isNaN(p) && 0 < p && n.push(p);
        h.wx = n}if (g = Wq(a, g, "stroke-dashoffset"))g = parseFloat(g), isNaN(g) || (h.uG = g); h.rA = !0}if (null !== k){k = k.split(")"); g = !0; for (l = 0; l < k.length; l++) / \(. * [ ^ 0 - 9\., \s - ] / .test(k[l]) && (g = !1), /\(.*[0-9]-[0-9]/.test(k[l]) && (g = !1); if (g)for (l = k.length - 1; 0 <= l; l--)if (m = k[l], "" !== m)switch (n = m.indexOf("("), g = m.substring(0, n).replace(/\s*/, ""), n = m.substring(n + 1).split(/\s*[\s,]\s*/), g){case "rotate":$q(a, h, n); break; case "translate":g = h; m = parseFloat(n[0]); isNaN(m) && (m = 0); n = parseFloat(n[1]); isNaN(n) && (n = 0); if (0 !== m || 0 !==
        n)p = g.position.copy(), isNaN(p.x) && (p.x = 0), isNaN(p.y) && (p.y = 0), g.position = new w(m + p.x, n + p.y); break; case "scale":ar(a, h, n); break; case "skewX":br(a, h, n); break; case "skewY":cr(a, h, n); break; case "matrix":dr(a, h, n)}}if (h instanceof y){k = h.elements.k; l = g = 0; m = h.position.copy(); isNaN(m.x) && (m.x = 0); isNaN(m.y) && (m.y = 0); for (; k.next(); )n = k.value.position.copy(), isNaN(n.x) && (n.x = 0), isNaN(n.y) && (n.y = 0), n.x < g && (g = n.x), n.y < l && (l = n.y); m.x += g; m.y += l; h.position = m}null === c?a.Wn.push(h):c.add(h)}}}if (null !== h){a = Yq(b,
        "visibility"); if ("hidden" === a || "collapse" === a)h.visible = !1; if (b = Yq(b, "opacity"))b = parseFloat(b), isNaN(b) || (h.opacity = b)}}}
function dr(a, b, c){var d = parseFloat(c[0]), f = parseFloat(c[1]), g = parseFloat(c[2]), h = parseFloat(c[3]), k = parseFloat(c[4]), l = parseFloat(c[5]); if (!isNaN(d + f + g + h + k + l)){var m = b.position.copy(); isNaN(m.x) && (m.x = 0); isNaN(m.y) && (m.y = 0); if (b instanceof W){c = b.nd.copy(); if (c.type === Ec)c = a.Ds(c); else if (c.type === Mc)c = er(c); else if (c.type === Dc){c.type = Ac; a = new Bc(c.qa, c.ra); var n = new id(Oc, c.D, c.F); a.Fa.add(n); c.Ab.add(a)}c.offset(m.x, m.y); c.transform(d, f, g, h, k - m.x, l - m.y); a = c.normalize(); b.nd = c; m.x -= a.x; m.y -= a.y;
        b.position = m} else{for (b = b.elements.k; b.next(); )d = b.value.position.copy(), d.x += m.x, d.y += m.y, b.value.position = d; for (b.reset(); b.next(); )dr(a, b.value, c); for (b.reset(); b.next(); )d = b.value.position.copy(), d.x -= m.x, d.y -= m.y, b.value.position = d}}}
function $q(a, b, c){var d = parseFloat(c[0]); isNaN(d) && (d = 0); var f = parseFloat(c[1]); isNaN(f) && (f = 0); var g = parseFloat(c[2]); isNaN(g) && (g = 0); if (0 !== d){var h = d * Math.PI / 180, k = b.position.copy(); isNaN(k.x) && (k.x = 0); isNaN(k.y) && (k.y = 0); if (b instanceof W){c = b.nd.copy(); c.type === Mc?c = er(c):c.type === Ec && (c = a.Ds(c)); if (c.type === Ac)c.rotate(d, f - k.x, g - k.y), g = c.normalize(), b.nd = c, k.x -= g.x, k.y -= g.y, b.position = k; else{var d = c.qa - f + k.x, l = c.ra - g + k.y, m = c.D - f + k.x, n = c.F - g + k.y; a = d * Math.cos(h) - l * Math.sin(h) + f - k.x; d = l * Math.cos(h) +
        d * Math.sin(h) + g - k.y; f = m * Math.cos(h) - n * Math.sin(h) + f - k.x; g = n * Math.cos(h) + m * Math.sin(h) + g - k.y; m = Math.min(a, f); n = Math.min(d, g); c.qa = a - m; c.ra = d - n; c.D = f - m; c.F = g - n; k.x += m; k.y += n; b.position = k; b.nd = c}b.fill instanceof fa && (k = b.fill.copy(), c = Math.atan((0.5 - k.start.y) / (0.5 - k.start.x)), isNaN(c) || (c += h, k.start = new I((1 - Math.cos(c)) / 2, (1 - Math.sin(c)) / 2), k.end = new I((1 + Math.cos(c)) / 2, (1 + Math.sin(c)) / 2)), b.fill = k); b.stroke instanceof fa && (k = b.stroke.copy(), c = Math.atan((0.5 - k.start.y) / (0.5 - k.start.x)), isNaN(c) ||
        (c += h, k.start = new I((1 - Math.cos(c)) / 2, (1 - Math.sin(c)) / 2), k.end = new I((1 + Math.cos(c)) / 2, (1 + Math.sin(c)) / 2)), b.stroke = k)} else{for (b = b.elements.k; b.next(); )h = b.value.position.copy(), h.x += k.x, h.y += k.y, b.value.position = h; for (b.reset(); b.next(); )$q(a, b.value, c); for (b.reset(); b.next(); )h = b.value.position.copy(), h.x -= k.x, h.y -= k.y, b.value.position = h}}}
function ar(a, b, c){var d = parseFloat(c[0]); isNaN(d) && (d = 1); var f = parseFloat(c[1]); isNaN(f) && (f = d); if (1 !== d || 1 !== f){var g = b.position.copy(); isNaN(g.x) && (g.x = 0); isNaN(g.y) && (g.y = 0); if (b instanceof W)a = b.nd.copy(), g.x *= d, g.y *= f, b.position = g, a.scale(d, f), b.nd = a; else{for (b = b.elements.k; b.next(); )d = b.value.position.copy(), d.x += g.x, d.y += g.y, b.value.position = d; for (b.reset(); b.next(); )ar(a, b.value, c); for (b.reset(); b.next(); )d = b.value.position.copy(), d.x -= g.x, d.y -= g.y, b.value.position = d}}}
function br(a, b, c){var d = parseFloat(c[0]); if (!isNaN(d)){var d = d * Math.PI / 180, f = b.position.copy(); isNaN(f.x) && (f.x = 0); isNaN(f.y) && (f.y = 0); if (b instanceof W){c = b.nd.copy(); if (c.type === Ec)c = a.Ds(c); else if (c.type === Mc)c = er(c); else if (c.type === Dc){c.type = Ac; a = new Bc(c.qa, c.ra); var g = new id(Oc, c.D, c.F); a.Fa.add(g); c.Ab.add(a)}c.offset(f.x, f.y); c.transform(1, 0, Math.tan(d), 1, - f.x, - f.y); a = c.normalize(); b.nd = c; f.x -= a.x; f.y -= a.y; b.position = f} else{for (b = b.elements.k; b.next(); )d = b.value.position.copy(), d.x += f.x,
        d.y += f.y, b.value.position = d; for (b.reset(); b.next(); )br(a, b.value, c); for (b.reset(); b.next(); )d = b.value.position.copy(), d.x -= f.x, d.y -= f.y, b.value.position = d}}}
function cr(a, b, c){var d = parseFloat(c[0]); if (!isNaN(d)){var d = d * Math.PI / 180, f = b.position.copy(); isNaN(f.x) && (f.x = 0); isNaN(f.y) && (f.y = 0); if (b instanceof W){c = b.nd.copy(); if (c.type === Ec)c = a.Ds(c); else if (c.type === Mc)c = er(c); else if (c.type === Dc){c.type = Ac; a = new Bc(c.qa, c.ra); var g = new id(Oc, c.D, c.F); a.Fa.add(g); c.Ab.add(a)}c.offset(f.x, f.y); c.transform(1, Math.tan(d), 0, 1, - f.x, - f.y); a = c.normalize(); b.nd = c; f.x -= a.x; f.y -= a.y; b.position = f} else{for (b = b.elements.k; b.next(); )d = b.value.position.copy(), d.x += f.x,
        d.y += f.y, b.value.position = d; for (b.reset(); b.next(); )cr(a, b.value, c); for (b.reset(); b.next(); )d = b.value.position.copy(), d.x -= f.x, d.y -= f.y, b.value.position = d}}}
function Zq(a){var b = !1; if ("polygon" === a.tagName)b = !0; else if ("polyline" !== a.tagName)return null; var c = new W, d = a.getAttribute("points"); a = new zc; var f = new B(Bc), g = d.split(/\s*[\s,]\s*/); if (4 > g.length)return null; for (var h, d = new B(id), k, l, m = 1; m < g.length; m += 2){k = eval(g[m - 1]); l = eval(g[m]); if ("number" !== typeof k || isNaN(k) || "number" !== typeof l || isNaN(l))return null; 1 === m?h = new Bc(k, l):d.add(new id(Oc, k, l))}b && (b = new id(Oc, h.qa, h.ra), b.close(), d.add(b)); h.Fa = d; f.add(h); a.Ab = f; h = a.normalize(); c.position =
        new w( - h.x, - h.y); c.nd = a; return c}
function er(a){var b = a.qa, c = a.ra, d = a.D, f = a.F, g = Math.abs(d - b) / 2, h = Math.abs(f - c) / 2, b = Math.min(b, d) + g, c = Math.min(c, f) + h; new w; f = new Bc(b, c - h); d = new id(cd); d.Bb = b + H.va * g; d.Rb = c - h; d.se = b + g; d.te = c - H.va * h; d.D = b + g; d.F = c; f.Fa.add(d); d = new id(cd); d.Bb = b + g; d.Rb = c + H.va * h; d.se = b + H.va * g; d.te = c + h; d.D = b; d.F = c + h; f.Fa.add(d); d = new id(cd); d.Bb = b - H.va * g; d.Rb = c + h; d.se = b - g; d.te = c + H.va * h; d.D = b - g; d.F = c; f.Fa.add(d); d = new id(cd); d.Bb = b - g; d.Rb = c - H.va * h; d.se = b - H.va * g; d.te = c - h; d.D = b; d.F = c - h; f.Fa.add(d); a.type = Ac; a.Ab.add(f);
        return a}Vq.prototype.Ds = function(a){var b = a.qa, c = a.ra, d = a.D, f = a.F, g = Math.min(b, d), h = Math.min(c, f), b = Math.abs(d - b), c = Math.abs(f - c), f = new Bc(g, h); f.Fa.add(new id(Oc, g + b, h)); f.Fa.add(new id(Oc, g + b, h + c)); f.Fa.add((new id(Oc, g, h + c)).close()); a.type = Ac; a.Ab.add(f); return a}; ca.version = "1.4.15";
        window && (window.module && "object" === typeof window.module && "object" === typeof window.module.exports?window.module.exports = ca:window.define && "function" === typeof window.define && window.define.amd?(window.go = ca, window.define(ca)):window.go = ca); })(window);
